diff --git a/.hark/changes/2026-10-29_stripe-openapi_ed017aed.change.md b/.hark/changes/2026-10-29_stripe-openapi_ed017aed.change.md new file mode 100644 index 000000000000..63aac107245c --- /dev/null +++ b/.hark/changes/2026-10-29_stripe-openapi_ed017aed.change.md @@ -0,0 +1,78 @@ +--- +title: Update generated code +pr_url: https://github.com/stripe/stripe-java/pull/2321 +semver_level: minor +is_stripe_api_change: true +--- + +* Add support for new resources `v2.core.vault.GbBankAccount`, `v2.core.vault.UsBankAccount`, `v2.moneymanagement.Adjustment`, `v2.moneymanagement.FinancialAccount`, `v2.moneymanagement.FinancialAddressCreditSimulation`, `v2.moneymanagement.FinancialAddress`, `v2.moneymanagement.InboundTransfer`, `v2.moneymanagement.OutboundPayment`, `v2.moneymanagement.OutboundSetupIntent`, `v2.moneymanagement.PayoutIntent`, `v2.moneymanagement.PayoutMethod`, `v2.moneymanagement.PayoutMethodsBankAccountSpec`, `v2.moneymanagement.ReceivedCredit`, `v2.moneymanagement.RecipientVerification`, `v2.moneymanagement.TransactionEntry`, and `v2.moneymanagement.Transaction` +* Add support for `acknowledge`, `create`, `recipient_verifications`, and `retrieve` methods on resource `v2.moneymanagement.RecipientVerification` +* Add support for `list` and `retrieve` methods on resources `v2.moneymanagement.Adjustment`, `v2.moneymanagement.ReceivedCredit`, and `v2.moneymanagement.TransactionEntry` +* Add support for `list`, `refresh_regulatory_receipt`, `retrieve`, and `update` methods on resource `v2.moneymanagement.Transaction` +* Add support for `credit` method on resource `v2.moneymanagement.FinancialAddressCreditSimulation` +* Add support for `retrieve` method on resource `v2.moneymanagement.PayoutMethodsBankAccountSpec` +* Add support for `archive`, `list`, `retrieve`, and `unarchive` methods on resource `v2.moneymanagement.PayoutMethod` +* Add support for `cancel`, `confirm`, `create`, `list`, `refresh_fx_quote`, `refresh_recipient_verification`, `retrieve`, and `update` methods on resource `v2.moneymanagement.PayoutIntent` +* Add support for `cancel`, `create`, `list`, `retrieve`, and `update` methods on resource `v2.moneymanagement.OutboundSetupIntent` +* Add support for `cancel`, `create`, `list`, and `retrieve` methods on resource `v2.moneymanagement.OutboundPayment` +* Add support for `create`, `list`, and `retrieve` methods on resources `v2.moneymanagement.FinancialAddress` and `v2.moneymanagement.InboundTransfer` +* Add support for `list`, `retrieve`, and `update` methods on resource `v2.moneymanagement.FinancialAccount` +* Add support for `archive`, `confirm_microdeposits`, `create`, `list`, `retrieve`, `send_microdeposits`, `unarchive`, and `update` methods on resource `v2.core.vault.UsBankAccount` +* Add support for `archive`, `create`, `list`, `retrieve`, and `unarchive` methods on resource `v2.core.vault.GbBankAccount` +* Add support for `reportingChart`, `terminalHardwareOrders`, and `terminalHardwareShop` on `AccountSession.components` and `AccountSessionCreateParams.components` +* Add support for `weroPayments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities` +* Add support for `physicalAddress` on `Account.company`, `AccountCreateParams.company`, `AccountUpdateParams.company`, and `TokenCreateParams.account.company` +* Add support for `proofOfBusinessPresence` on `AccountCreateParams.documents` and `AccountUpdateParams.documents` +* Add support for `subscriptionPause` on `billingportal.Configuration.features`, `billingportal.ConfigurationCreateParams.features`, `billingportal.ConfigurationUpdateParams.features`, `billingportal.Session.flow`, and `billingportal.SessionCreateParams.flow_data` +* Add support for `afterExpiration` on `billingportal.SessionCreateParams` and `billingportal.Session` +* Add support for new value `subscription_pause` on enum `billingportal.SessionCreateParams.flow_data.type` +* Add support for `setupCredentialUsage` on `Charge.payment_method_details.card`, `PaymentIntent.payment_method_options.card`, `PaymentIntentConfirmParams.payment_method_options.card`, `PaymentIntentCreateParams.payment_method_options.card`, `PaymentIntentUpdateParams.payment_method_options.card`, `SetupIntent.payment_method_options.card`, `SetupIntentConfirmParams.payment_method_options.card`, `SetupIntentCreateParams.payment_method_options.card`, and `SetupIntentUpdateParams.payment_method_options.card` +* Add support for `storedCredentialUsage` on `Charge.payment_method_details.card`, `PaymentAttemptRecord.payment_method_details.card`, `PaymentIntent.payment_method_options.card`, `PaymentIntentConfirmParams.payment_method_options.card`, `PaymentIntentCreateParams.payment_method_options.card`, `PaymentIntentUpdateParams.payment_method_options.card`, and `PaymentRecord.payment_method_details.card` +* Add support for new value `hi-IN` on enum `checkout.SessionCreateParams.locale` +* Add support for `accountTaxIds`, `customFields`, `description`, and `footer` on `PaymentLink.subscription_data.invoice_settings`, `PaymentLinkCreateParams.subscription_data.invoice_settings`, `PaymentLinkUpdateParams.subscription_data.invoice_settings`, and `checkout.SessionCreateParams.subscription_data.invoice_settings` +* Add support for `paymentIntentData` on `checkout.SessionUpdateParams` +* Add support for new values `au_acn`, `au_wpn`, `bw_vat`, `ci_vat`, `cz_dic`, `fr_siren`, `fr_siret`, `fr_spi`, `gh_tin`, `is_kt`, `md_cf`, `mu_vat`, `mz_nuit`, `nz_bn`, `pt_nif`, `sm_coe`, `tt_bir`, and `tt_vat` on enums `CustomerCreateParams.tax_id_data[].type`, `InvoiceCreatePreviewParams.customer_details.tax_ids[].type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParams.customer_details.tax_ids[].type` +* Add support for `intendedSubmissionMethod` on `DisputeUpdateParams` and `Dispute` +* Add support for `appeal` on `Dispute.evidence` and `DisputeUpdateParams.evidence` +* Add support for `submissionMethod` on `Dispute.evidence_details` +* Add support for new value `sequra` on enums `InvoiceCreateParams.payment_settings.paymentMethodTypes`, `InvoiceUpdateParams.payment_settings.paymentMethodTypes`, `SubscriptionCreateParams.payment_settings.paymentMethodTypes`, and `SubscriptionUpdateParams.payment_settings.paymentMethodTypes` +* Add support for new values `admissions_tax`, `attendance_tax`, `entertainment_tax`, `get_fund`, `gross_receipts_tax`, `hospitality_tax`, `luxury_tax`, `nhil`, `resort_tax`, and `tourism_tax` on enums `InvoiceAddLinesParams.lines[].tax_amounts[].tax_rate_data.taxType`, `InvoiceLineItemUpdateParams.tax_amounts[].tax_rate_data.taxType`, `InvoiceUpdateLinesParams.lines[].tax_amounts[].tax_rate_data.taxType`, `TaxRateCreateParams.taxType`, and `TaxRateUpdateParams.taxType` +* Add support for `pauseSchedules` on `InvoiceCreatePreviewParams.schedule_details` +* Add support for `financialAccount` on `issuing.CardUpdateParams` +* Add support for `deliveredAt` and `shippedAt` on `issuing.Card.shipping` +* Add support for new value `scalapay` on enums `PaymentLinkCreateParams.paymentMethodTypes` and `PaymentLinkUpdateParams.paymentMethodTypes` +* Add support for `referenceStatus` and `reference` on `Refund.destination_details.afterpay_clearpay`, `Refund.destination_details.klarna`, and `Refund.destination_details.paypal` +* Add support for `bw`, `ci`, `gh`, and `mu` on `tax.Registration.country_options` and `tax.RegistrationCreateParams.country_options` +* Add support for `utilityUsersTax` on `tax.Registration.country_options.us` and `tax.RegistrationCreateParams.country_options.us` +* Add support for new values `digital_excise_tax` and `utility_users_tax` on enum `tax.RegistrationCreateParams.country_options.us.type` +* Add support for `readerSecurity` and `stripeT600` on `terminal.ConfigurationCreateParams`, `terminal.ConfigurationUpdateParams`, and `terminal.Configuration` +* Add support for new values `simulated_stripe_t600` and `stripe_t600` on enum `terminal.ReaderListParams.deviceType` +* Add support for new values `three_d_secure.authentication.canceled`, `three_d_secure.authentication.challenge_started`, `three_d_secure.authentication.errored`, `three_d_secure.authentication.failed`, `three_d_secure.authentication.requires_challenge`, `three_d_secure.authentication.requires_submission`, and `three_d_secure.authentication.succeeded` on enums `WebhookEndpointCreateParams.enabledEvents` and `WebhookEndpointUpdateParams.enabledEvents` +* Add support for new value `2026-10-28.endive` on enum `WebhookEndpointCreateParams.apiVersion` +* Add support for `bankAccounts` and `cards` on `v2.core.Account.configuration.recipient.capabilities`, `v2.core.AccountCreateParams.configuration.recipient.capabilities`, and `v2.core.AccountUpdateParams.configuration.recipient.capabilities` +* Add support for `payoutMethods` on `v2.core.Account.defaults` and `v2.core.AccountUpdateParams.defaults` +* Add support for `alternatives` on `v2.core.Account.future_requirements` and `v2.core.Account.requirements` +* Add support for `customer` and `subscription` on `EventsV1InvoiceUpcomingEvent` +* Add support for new values `bank_accounts.ach`, `bank_accounts.fedwire`, `bank_accounts.fps`, `bank_accounts.rtp`, `bank_accounts.sepa`, and `bank_accounts.swift` on enum `EventsV2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.updatedCapability` +* Add support for snapshot events `three_d_secure.authentication.canceled`, `three_d_secure.authentication.challenge_started`, `three_d_secure.authentication.errored`, `three_d_secure.authentication.failed`, `three_d_secure.authentication.requires_challenge`, `three_d_secure.authentication.requires_submission`, and `three_d_secure.authentication.succeeded` with resource `threedsecure.Authentication` +* Add support for event notifications `V1CustomerDiscountSourceChangedEvent`, `V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent`, and `V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent` +* Add support for event notifications `V1CustomerSubscriptionActiveEvent`, `V1CustomerSubscriptionCancelAtChangedEvent`, `V1CustomerSubscriptionDefaultPaymentMethodChangedEvent`, `V1CustomerSubscriptionIncompleteEvent`, `V1CustomerSubscriptionIncompleteExpiredEvent`, `V1CustomerSubscriptionItemAddedEvent`, `V1CustomerSubscriptionItemPriceChangedEvent`, `V1CustomerSubscriptionItemQuantityChangedEvent`, `V1CustomerSubscriptionItemRemovedEvent`, `V1CustomerSubscriptionItemTaxRatesChangedEvent`, `V1CustomerSubscriptionPastDueEvent`, `V1CustomerSubscriptionTrialingEvent`, and `V1CustomerSubscriptionUnpaidEvent` with related object `Subscription` +* Add support for event notifications `V1FinancialConnectionsAccountBalanceRefreshFailedEvent`, `V1FinancialConnectionsAccountBalanceRefreshSucceededEvent`, `V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent`, `V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent`, `V1FinancialConnectionsAccountOwnershipRefreshFailedEvent`, `V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent`, `V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent`, `V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent`, `V1FinancialConnectionsAccountTransactionsRefreshFailedEvent`, and `V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent` with related object `financialconnections.Account` +* Add support for event notifications `V1InvoiceDiscountAddedEvent`, `V1InvoiceDiscountRemovedEvent`, `V1InvoiceLineItemAddedEvent`, `V1InvoiceLineItemPricingChangedEvent`, `V1InvoiceLineItemQuantityChangedEvent`, and `V1InvoiceLineItemRemovedEvent` with related object `Invoice` +* Add support for event notifications `V1InvoicePaymentCanceledEvent` and `V1InvoicePaymentOpenEvent` with related object `InvoicePayment` +* Add support for event notifications `V1InvoiceitemAmountChangedEvent`, `V1InvoiceitemDiscountAddedEvent`, and `V1InvoiceitemDiscountRemovedEvent` with related object `InvoiceItem` +* Add support for event notifications `V1PriceActivatedEvent`, `V1PriceDeactivatedEvent`, `V1PriceLookupKeyChangedEvent`, and `V1PriceTaxBehaviorChangedEvent` with related object `Price` +* Add support for event notifications `V1ProductActivatedEvent`, `V1ProductDeactivatedEvent`, `V1ProductDefaultPriceChangedEvent`, and `V1ProductTaxCodeChangedEvent` with related object `Product` +* Add support for event notification `V1PromotionCodeFullyRedeemedEvent` with related object `PromotionCode` +* Add support for event notifications `V1SubscriptionSchedulePhaseAddedEvent`, `V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent`, `V1SubscriptionSchedulePhaseEndDateChangedEvent`, `V1SubscriptionSchedulePhaseRemovedEvent`, and `V1SubscriptionSchedulePhaseTrialEndChangedEvent` with related object `SubscriptionSchedule` +* Add support for event notification `V2MoneyManagementAdjustmentCreatedEvent` with related object `v2.moneymanagement.Adjustment` +* Add support for event notifications `V2MoneyManagementFinancialAccountCreatedEvent` and `V2MoneyManagementFinancialAccountUpdatedEvent` with related object `v2.moneymanagement.FinancialAccount` +* Add support for event notifications `V2MoneyManagementFinancialAddressActivatedEvent` and `V2MoneyManagementFinancialAddressFailedEvent` with related object `v2.moneymanagement.FinancialAddress` +* Add support for event notifications `V2MoneyManagementInboundTransferAvailableEvent`, `V2MoneyManagementInboundTransferBankDebitFailedEvent`, `V2MoneyManagementInboundTransferBankDebitProcessingEvent`, `V2MoneyManagementInboundTransferBankDebitQueuedEvent`, `V2MoneyManagementInboundTransferBankDebitReturnedEvent`, and `V2MoneyManagementInboundTransferBankDebitSucceededEvent` with related object `v2.moneymanagement.InboundTransfer` +* Add support for event notifications `V2MoneyManagementOutboundPaymentCanceledEvent`, `V2MoneyManagementOutboundPaymentCreatedEvent`, `V2MoneyManagementOutboundPaymentFailedEvent`, `V2MoneyManagementOutboundPaymentPostedEvent`, `V2MoneyManagementOutboundPaymentReturnedEvent`, `V2MoneyManagementOutboundPaymentUnderReviewEvent`, and `V2MoneyManagementOutboundPaymentUpdatedEvent` with related object `v2.moneymanagement.OutboundPayment` +* Add support for event notifications `V2MoneyManagementPayoutIntentCanceledEvent`, `V2MoneyManagementPayoutIntentCreatedEvent`, `V2MoneyManagementPayoutIntentPendingEvent`, `V2MoneyManagementPayoutIntentPostedEvent`, `V2MoneyManagementPayoutIntentProcessingEvent`, `V2MoneyManagementPayoutIntentRequiresActionEvent`, and `V2MoneyManagementPayoutIntentUpdatedEvent` with related object `v2.moneymanagement.PayoutIntent` +* Add support for event notifications `V2MoneyManagementPayoutMethodCreatedEvent` and `V2MoneyManagementPayoutMethodUpdatedEvent` with related object `v2.moneymanagement.PayoutMethod` +* Add support for event notifications `V2MoneyManagementReceivedCreditAvailableEvent`, `V2MoneyManagementReceivedCreditFailedEvent`, `V2MoneyManagementReceivedCreditReturnedEvent`, and `V2MoneyManagementReceivedCreditSucceededEvent` with related object `v2.moneymanagement.ReceivedCredit` +* Add support for event notifications `V2MoneyManagementRecipientVerificationCreatedEvent` and `V2MoneyManagementRecipientVerificationUpdatedEvent` with related object `v2.moneymanagement.RecipientVerification` +* Add support for event notifications `V2MoneyManagementTransactionCreatedEvent` and `V2MoneyManagementTransactionUpdatedEvent` with related object `v2.moneymanagement.Transaction` +* Add support for error types `AlreadyCanceledException`, `BlockedByStripeException`, `CannotProceedException`, `CapabilityNotEnabledException`, `ControlledByAlternateResourceException`, `FeatureNotEnabledException`, `FinancialAccountNotOpenException`, `FxQuoteNeedsRefreshException`, `InsufficientFundsException`, `InvalidPaymentMethodException`, `InvalidPayoutMethodException`, `InvalidVaultedCredentialException`, `NotCancelableException`, `QuotaExceededException`, `RecipientNotNotifiableException`, `VerificationAttemptFailedException`, `VerificationExpiredException`, and `VerificationNotInitiatedException` diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 6aca587b4dcb..b9979ecd9d20 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -588801ef34f7b5f7d6a784d3354f5f93d2a26ffb \ No newline at end of file +65c49b0893d71e8cfe272b2d38cd3307ee1833f2 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bfaa37da32f9..9a21d2dc60bc 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2526 \ No newline at end of file +v2596 \ No newline at end of file diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index 8eff3d145c60..8ad6a6b2e2f2 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,6 +2,6 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2026-09-30.endive"; + public static final String CURRENT = "2026-10-28.endive"; public static final String CURRENT_MAJOR = "endive"; } diff --git a/src/main/java/com/stripe/StripeEventNotificationHandlerBase.java b/src/main/java/com/stripe/StripeEventNotificationHandlerBase.java index 7810281b2932..72634861de33 100644 --- a/src/main/java/com/stripe/StripeEventNotificationHandlerBase.java +++ b/src/main/java/com/stripe/StripeEventNotificationHandlerBase.java @@ -65,31 +65,57 @@ import com.stripe.events.V1CustomerDeletedEventNotification; import com.stripe.events.V1CustomerDiscountCreatedEventNotification; import com.stripe.events.V1CustomerDiscountDeletedEventNotification; +import com.stripe.events.V1CustomerDiscountSourceChangedEventNotification; import com.stripe.events.V1CustomerDiscountUpdatedEventNotification; +import com.stripe.events.V1CustomerSubscriptionActiveEventNotification; +import com.stripe.events.V1CustomerSubscriptionCancelAtChangedEventNotification; import com.stripe.events.V1CustomerSubscriptionCreatedEventNotification; +import com.stripe.events.V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification; import com.stripe.events.V1CustomerSubscriptionDeletedEventNotification; +import com.stripe.events.V1CustomerSubscriptionIncompleteEventNotification; +import com.stripe.events.V1CustomerSubscriptionIncompleteExpiredEventNotification; +import com.stripe.events.V1CustomerSubscriptionItemAddedEventNotification; +import com.stripe.events.V1CustomerSubscriptionItemPriceChangedEventNotification; +import com.stripe.events.V1CustomerSubscriptionItemQuantityChangedEventNotification; +import com.stripe.events.V1CustomerSubscriptionItemRemovedEventNotification; +import com.stripe.events.V1CustomerSubscriptionItemTaxRatesChangedEventNotification; +import com.stripe.events.V1CustomerSubscriptionPastDueEventNotification; import com.stripe.events.V1CustomerSubscriptionPausedEventNotification; import com.stripe.events.V1CustomerSubscriptionPendingUpdateAppliedEventNotification; import com.stripe.events.V1CustomerSubscriptionPendingUpdateExpiredEventNotification; import com.stripe.events.V1CustomerSubscriptionResumedEventNotification; import com.stripe.events.V1CustomerSubscriptionTrialWillEndEventNotification; +import com.stripe.events.V1CustomerSubscriptionTrialingEventNotification; +import com.stripe.events.V1CustomerSubscriptionUnpaidEventNotification; import com.stripe.events.V1CustomerSubscriptionUpdatedEventNotification; import com.stripe.events.V1CustomerTaxIdCreatedEventNotification; import com.stripe.events.V1CustomerTaxIdDeletedEventNotification; import com.stripe.events.V1CustomerTaxIdUpdatedEventNotification; import com.stripe.events.V1CustomerUpdatedEventNotification; +import com.stripe.events.V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification; +import com.stripe.events.V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification; import com.stripe.events.V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification; import com.stripe.events.V1FileCreatedEventNotification; import com.stripe.events.V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification; +import com.stripe.events.V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification; +import com.stripe.events.V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification; import com.stripe.events.V1FinancialConnectionsAccountCreatedEventNotification; import com.stripe.events.V1FinancialConnectionsAccountDeactivatedEventNotification; import com.stripe.events.V1FinancialConnectionsAccountDisconnectedEventNotification; import com.stripe.events.V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification; +import com.stripe.events.V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification; +import com.stripe.events.V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification; +import com.stripe.events.V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification; +import com.stripe.events.V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification; import com.stripe.events.V1FinancialConnectionsAccountReactivatedEventNotification; import com.stripe.events.V1FinancialConnectionsAccountRefreshedBalanceEventNotification; import com.stripe.events.V1FinancialConnectionsAccountRefreshedOwnershipEventNotification; import com.stripe.events.V1FinancialConnectionsAccountRefreshedTransactionsEventNotification; +import com.stripe.events.V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification; +import com.stripe.events.V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification; import com.stripe.events.V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification; +import com.stripe.events.V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification; +import com.stripe.events.V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification; import com.stripe.events.V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification; import com.stripe.events.V1FinancialConnectionsAccountUpcomingDeactivationEventNotification; import com.stripe.events.V1IdentityVerificationSessionCanceledEventNotification; @@ -100,15 +126,23 @@ import com.stripe.events.V1IdentityVerificationSessionVerifiedEventNotification; import com.stripe.events.V1InvoiceCreatedEventNotification; import com.stripe.events.V1InvoiceDeletedEventNotification; +import com.stripe.events.V1InvoiceDiscountAddedEventNotification; +import com.stripe.events.V1InvoiceDiscountRemovedEventNotification; import com.stripe.events.V1InvoiceFinalizationFailedEventNotification; import com.stripe.events.V1InvoiceFinalizedEventNotification; +import com.stripe.events.V1InvoiceLineItemAddedEventNotification; +import com.stripe.events.V1InvoiceLineItemPricingChangedEventNotification; +import com.stripe.events.V1InvoiceLineItemQuantityChangedEventNotification; +import com.stripe.events.V1InvoiceLineItemRemovedEventNotification; import com.stripe.events.V1InvoiceMarkedUncollectibleEventNotification; import com.stripe.events.V1InvoiceOverdueEventNotification; import com.stripe.events.V1InvoiceOverpaidEventNotification; import com.stripe.events.V1InvoicePaidEventNotification; import com.stripe.events.V1InvoicePaymentActionRequiredEventNotification; import com.stripe.events.V1InvoicePaymentAttemptRequiredEventNotification; +import com.stripe.events.V1InvoicePaymentCanceledEventNotification; import com.stripe.events.V1InvoicePaymentFailedEventNotification; +import com.stripe.events.V1InvoicePaymentOpenEventNotification; import com.stripe.events.V1InvoicePaymentPaidEventNotification; import com.stripe.events.V1InvoicePaymentSucceededEventNotification; import com.stripe.events.V1InvoiceSentEventNotification; @@ -116,8 +150,11 @@ import com.stripe.events.V1InvoiceUpdatedEventNotification; import com.stripe.events.V1InvoiceVoidedEventNotification; import com.stripe.events.V1InvoiceWillBeDueEventNotification; +import com.stripe.events.V1InvoiceitemAmountChangedEventNotification; import com.stripe.events.V1InvoiceitemCreatedEventNotification; import com.stripe.events.V1InvoiceitemDeletedEventNotification; +import com.stripe.events.V1InvoiceitemDiscountAddedEventNotification; +import com.stripe.events.V1InvoiceitemDiscountRemovedEventNotification; import com.stripe.events.V1IssuingAuthorizationCreatedEventNotification; import com.stripe.events.V1IssuingAuthorizationRequestEventNotification; import com.stripe.events.V1IssuingAuthorizationUpdatedEventNotification; @@ -167,13 +204,22 @@ import com.stripe.events.V1PlanCreatedEventNotification; import com.stripe.events.V1PlanDeletedEventNotification; import com.stripe.events.V1PlanUpdatedEventNotification; +import com.stripe.events.V1PriceActivatedEventNotification; import com.stripe.events.V1PriceCreatedEventNotification; +import com.stripe.events.V1PriceDeactivatedEventNotification; import com.stripe.events.V1PriceDeletedEventNotification; +import com.stripe.events.V1PriceLookupKeyChangedEventNotification; +import com.stripe.events.V1PriceTaxBehaviorChangedEventNotification; import com.stripe.events.V1PriceUpdatedEventNotification; +import com.stripe.events.V1ProductActivatedEventNotification; import com.stripe.events.V1ProductCreatedEventNotification; +import com.stripe.events.V1ProductDeactivatedEventNotification; +import com.stripe.events.V1ProductDefaultPriceChangedEventNotification; import com.stripe.events.V1ProductDeletedEventNotification; +import com.stripe.events.V1ProductTaxCodeChangedEventNotification; import com.stripe.events.V1ProductUpdatedEventNotification; import com.stripe.events.V1PromotionCodeCreatedEventNotification; +import com.stripe.events.V1PromotionCodeFullyRedeemedEventNotification; import com.stripe.events.V1PromotionCodeUpdatedEventNotification; import com.stripe.events.V1QuoteAcceptedEventNotification; import com.stripe.events.V1QuoteCanceledEventNotification; @@ -201,6 +247,11 @@ import com.stripe.events.V1SubscriptionScheduleCompletedEventNotification; import com.stripe.events.V1SubscriptionScheduleCreatedEventNotification; import com.stripe.events.V1SubscriptionScheduleExpiringEventNotification; +import com.stripe.events.V1SubscriptionSchedulePhaseAddedEventNotification; +import com.stripe.events.V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification; +import com.stripe.events.V1SubscriptionSchedulePhaseEndDateChangedEventNotification; +import com.stripe.events.V1SubscriptionSchedulePhaseRemovedEventNotification; +import com.stripe.events.V1SubscriptionSchedulePhaseTrialEndChangedEventNotification; import com.stripe.events.V1SubscriptionScheduleReleasedEventNotification; import com.stripe.events.V1SubscriptionScheduleUpdatedEventNotification; import com.stripe.events.V1TaxRateCreatedEventNotification; @@ -244,6 +295,41 @@ import com.stripe.events.V2CoreAccountPersonUpdatedEventNotification; import com.stripe.events.V2CoreAccountUpdatedEventNotification; import com.stripe.events.V2CoreEventDestinationPingEventNotification; +import com.stripe.events.V2MoneyManagementAdjustmentCreatedEventNotification; +import com.stripe.events.V2MoneyManagementFinancialAccountCreatedEventNotification; +import com.stripe.events.V2MoneyManagementFinancialAccountUpdatedEventNotification; +import com.stripe.events.V2MoneyManagementFinancialAddressActivatedEventNotification; +import com.stripe.events.V2MoneyManagementFinancialAddressFailedEventNotification; +import com.stripe.events.V2MoneyManagementInboundTransferAvailableEventNotification; +import com.stripe.events.V2MoneyManagementInboundTransferBankDebitFailedEventNotification; +import com.stripe.events.V2MoneyManagementInboundTransferBankDebitProcessingEventNotification; +import com.stripe.events.V2MoneyManagementInboundTransferBankDebitQueuedEventNotification; +import com.stripe.events.V2MoneyManagementInboundTransferBankDebitReturnedEventNotification; +import com.stripe.events.V2MoneyManagementInboundTransferBankDebitSucceededEventNotification; +import com.stripe.events.V2MoneyManagementOutboundPaymentCanceledEventNotification; +import com.stripe.events.V2MoneyManagementOutboundPaymentCreatedEventNotification; +import com.stripe.events.V2MoneyManagementOutboundPaymentFailedEventNotification; +import com.stripe.events.V2MoneyManagementOutboundPaymentPostedEventNotification; +import com.stripe.events.V2MoneyManagementOutboundPaymentReturnedEventNotification; +import com.stripe.events.V2MoneyManagementOutboundPaymentUnderReviewEventNotification; +import com.stripe.events.V2MoneyManagementOutboundPaymentUpdatedEventNotification; +import com.stripe.events.V2MoneyManagementPayoutIntentCanceledEventNotification; +import com.stripe.events.V2MoneyManagementPayoutIntentCreatedEventNotification; +import com.stripe.events.V2MoneyManagementPayoutIntentPendingEventNotification; +import com.stripe.events.V2MoneyManagementPayoutIntentPostedEventNotification; +import com.stripe.events.V2MoneyManagementPayoutIntentProcessingEventNotification; +import com.stripe.events.V2MoneyManagementPayoutIntentRequiresActionEventNotification; +import com.stripe.events.V2MoneyManagementPayoutIntentUpdatedEventNotification; +import com.stripe.events.V2MoneyManagementPayoutMethodCreatedEventNotification; +import com.stripe.events.V2MoneyManagementPayoutMethodUpdatedEventNotification; +import com.stripe.events.V2MoneyManagementReceivedCreditAvailableEventNotification; +import com.stripe.events.V2MoneyManagementReceivedCreditFailedEventNotification; +import com.stripe.events.V2MoneyManagementReceivedCreditReturnedEventNotification; +import com.stripe.events.V2MoneyManagementReceivedCreditSucceededEventNotification; +import com.stripe.events.V2MoneyManagementRecipientVerificationCreatedEventNotification; +import com.stripe.events.V2MoneyManagementRecipientVerificationUpdatedEventNotification; +import com.stripe.events.V2MoneyManagementTransactionCreatedEventNotification; +import com.stripe.events.V2MoneyManagementTransactionUpdatedEventNotification; import com.stripe.model.v2.core.EventNotification; import java.util.ArrayList; import java.util.Collections; @@ -713,24 +799,100 @@ public T onV1CustomerDiscountDeleted( return self(); } + public T onV1CustomerDiscountSourceChanged( + EventNotificationCallback callback) { + this.register("v1.customer.discount.source_changed", callback); + return self(); + } + public T onV1CustomerDiscountUpdated( EventNotificationCallback callback) { this.register("v1.customer.discount.updated", callback); return self(); } + public T onV1CustomerSubscriptionActive( + EventNotificationCallback callback) { + this.register("v1.customer.subscription.active", callback); + return self(); + } + + public T onV1CustomerSubscriptionCancelAtChanged( + EventNotificationCallback callback) { + this.register("v1.customer.subscription.cancel_at_changed", callback); + return self(); + } + public T onV1CustomerSubscriptionCreated( EventNotificationCallback callback) { this.register("v1.customer.subscription.created", callback); return self(); } + public T onV1CustomerSubscriptionDefaultPaymentMethodChanged( + EventNotificationCallback + callback) { + this.register("v1.customer.subscription.default_payment_method_changed", callback); + return self(); + } + public T onV1CustomerSubscriptionDeleted( EventNotificationCallback callback) { this.register("v1.customer.subscription.deleted", callback); return self(); } + public T onV1CustomerSubscriptionIncomplete( + EventNotificationCallback callback) { + this.register("v1.customer.subscription.incomplete", callback); + return self(); + } + + public T onV1CustomerSubscriptionIncompleteExpired( + EventNotificationCallback + callback) { + this.register("v1.customer.subscription.incomplete_expired", callback); + return self(); + } + + public T onV1CustomerSubscriptionItemAdded( + EventNotificationCallback callback) { + this.register("v1.customer.subscription.item_added", callback); + return self(); + } + + public T onV1CustomerSubscriptionItemPriceChanged( + EventNotificationCallback callback) { + this.register("v1.customer.subscription.item_price_changed", callback); + return self(); + } + + public T onV1CustomerSubscriptionItemQuantityChanged( + EventNotificationCallback + callback) { + this.register("v1.customer.subscription.item_quantity_changed", callback); + return self(); + } + + public T onV1CustomerSubscriptionItemRemoved( + EventNotificationCallback callback) { + this.register("v1.customer.subscription.item_removed", callback); + return self(); + } + + public T onV1CustomerSubscriptionItemTaxRatesChanged( + EventNotificationCallback + callback) { + this.register("v1.customer.subscription.item_tax_rates_changed", callback); + return self(); + } + + public T onV1CustomerSubscriptionPastDue( + EventNotificationCallback callback) { + this.register("v1.customer.subscription.past_due", callback); + return self(); + } + public T onV1CustomerSubscriptionPaused( EventNotificationCallback callback) { this.register("v1.customer.subscription.paused", callback); @@ -763,6 +925,18 @@ public T onV1CustomerSubscriptionTrialWillEnd( return self(); } + public T onV1CustomerSubscriptionTrialing( + EventNotificationCallback callback) { + this.register("v1.customer.subscription.trialing", callback); + return self(); + } + + public T onV1CustomerSubscriptionUnpaid( + EventNotificationCallback callback) { + this.register("v1.customer.subscription.unpaid", callback); + return self(); + } + public T onV1CustomerSubscriptionUpdated( EventNotificationCallback callback) { this.register("v1.customer.subscription.updated", callback); @@ -800,6 +974,22 @@ public T onV1CustomerCashBalanceTransactionCreated( return self(); } + public T onV1EntitlementsActiveEntitlementSummaryEntitlementAdded( + EventNotificationCallback< + V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification> + callback) { + this.register("v1.entitlements.active_entitlement_summary.entitlement_added", callback); + return self(); + } + + public T onV1EntitlementsActiveEntitlementSummaryEntitlementRemoved( + EventNotificationCallback< + V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification> + callback) { + this.register("v1.entitlements.active_entitlement_summary.entitlement_removed", callback); + return self(); + } + public T onV1EntitlementsActiveEntitlementSummaryUpdated( EventNotificationCallback callback) { @@ -819,6 +1009,21 @@ public T onV1FinancialConnectionsAccountAccountNumbersUpdated( return self(); } + public T onV1FinancialConnectionsAccountBalanceRefreshFailed( + EventNotificationCallback + callback) { + this.register("v1.financial_connections.account.balance_refresh_failed", callback); + return self(); + } + + public T onV1FinancialConnectionsAccountBalanceRefreshSucceeded( + EventNotificationCallback< + V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification> + callback) { + this.register("v1.financial_connections.account.balance_refresh_succeeded", callback); + return self(); + } + public T onV1FinancialConnectionsAccountCreated( EventNotificationCallback callback) { this.register("v1.financial_connections.account.created", callback); @@ -847,6 +1052,38 @@ public T onV1FinancialConnectionsAccountExpectedDeactivationDateUpdated( return self(); } + public T onV1FinancialConnectionsAccountInferredBalancesRefreshFailed( + EventNotificationCallback< + V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification> + callback) { + this.register("v1.financial_connections.account.inferred_balances_refresh_failed", callback); + return self(); + } + + public T onV1FinancialConnectionsAccountInferredBalancesRefreshSucceeded( + EventNotificationCallback< + V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification> + callback) { + this.register("v1.financial_connections.account.inferred_balances_refresh_succeeded", callback); + return self(); + } + + public T onV1FinancialConnectionsAccountOwnershipRefreshFailed( + EventNotificationCallback< + V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification> + callback) { + this.register("v1.financial_connections.account.ownership_refresh_failed", callback); + return self(); + } + + public T onV1FinancialConnectionsAccountOwnershipRefreshSucceeded( + EventNotificationCallback< + V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification> + callback) { + this.register("v1.financial_connections.account.ownership_refresh_succeeded", callback); + return self(); + } + public T onV1FinancialConnectionsAccountReactivated( EventNotificationCallback callback) { @@ -875,6 +1112,22 @@ public T onV1FinancialConnectionsAccountRefreshedTransactions( return self(); } + public T onV1FinancialConnectionsAccountRiskIntelligenceRefreshFailed( + EventNotificationCallback< + V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification> + callback) { + this.register("v1.financial_connections.account.risk_intelligence_refresh_failed", callback); + return self(); + } + + public T onV1FinancialConnectionsAccountRiskIntelligenceRefreshSucceeded( + EventNotificationCallback< + V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification> + callback) { + this.register("v1.financial_connections.account.risk_intelligence_refresh_succeeded", callback); + return self(); + } + public T onV1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdated( EventNotificationCallback< V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification> @@ -884,6 +1137,22 @@ public T onV1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdated( return self(); } + public T onV1FinancialConnectionsAccountTransactionsRefreshFailed( + EventNotificationCallback< + V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification> + callback) { + this.register("v1.financial_connections.account.transactions_refresh_failed", callback); + return self(); + } + + public T onV1FinancialConnectionsAccountTransactionsRefreshSucceeded( + EventNotificationCallback< + V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification> + callback) { + this.register("v1.financial_connections.account.transactions_refresh_succeeded", callback); + return self(); + } + public T onV1FinancialConnectionsAccountUpcomingAccountNumberExpiry( EventNotificationCallback< V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification> @@ -949,6 +1218,18 @@ public T onV1InvoiceDeleted( return self(); } + public T onV1InvoiceDiscountAdded( + EventNotificationCallback callback) { + this.register("v1.invoice.discount_added", callback); + return self(); + } + + public T onV1InvoiceDiscountRemoved( + EventNotificationCallback callback) { + this.register("v1.invoice.discount_removed", callback); + return self(); + } + public T onV1InvoiceFinalizationFailed( EventNotificationCallback callback) { this.register("v1.invoice.finalization_failed", callback); @@ -961,6 +1242,30 @@ public T onV1InvoiceFinalized( return self(); } + public T onV1InvoiceLineItemAdded( + EventNotificationCallback callback) { + this.register("v1.invoice.line_item_added", callback); + return self(); + } + + public T onV1InvoiceLineItemPricingChanged( + EventNotificationCallback callback) { + this.register("v1.invoice.line_item_pricing_changed", callback); + return self(); + } + + public T onV1InvoiceLineItemQuantityChanged( + EventNotificationCallback callback) { + this.register("v1.invoice.line_item_quantity_changed", callback); + return self(); + } + + public T onV1InvoiceLineItemRemoved( + EventNotificationCallback callback) { + this.register("v1.invoice.line_item_removed", callback); + return self(); + } + public T onV1InvoiceMarkedUncollectible( EventNotificationCallback callback) { this.register("v1.invoice.marked_uncollectible", callback); @@ -1036,12 +1341,30 @@ public T onV1InvoiceWillBeDue( return self(); } + public T onV1InvoicePaymentCanceled( + EventNotificationCallback callback) { + this.register("v1.invoice_payment.canceled", callback); + return self(); + } + + public T onV1InvoicePaymentOpen( + EventNotificationCallback callback) { + this.register("v1.invoice_payment.open", callback); + return self(); + } + public T onV1InvoicePaymentPaid( EventNotificationCallback callback) { this.register("v1.invoice_payment.paid", callback); return self(); } + public T onV1InvoiceitemAmountChanged( + EventNotificationCallback callback) { + this.register("v1.invoiceitem.amount_changed", callback); + return self(); + } + public T onV1InvoiceitemCreated( EventNotificationCallback callback) { this.register("v1.invoiceitem.created", callback); @@ -1054,6 +1377,18 @@ public T onV1InvoiceitemDeleted( return self(); } + public T onV1InvoiceitemDiscountAdded( + EventNotificationCallback callback) { + this.register("v1.invoiceitem.discount_added", callback); + return self(); + } + + public T onV1InvoiceitemDiscountRemoved( + EventNotificationCallback callback) { + this.register("v1.invoiceitem.discount_removed", callback); + return self(); + } + public T onV1IssuingAuthorizationCreated( EventNotificationCallback callback) { this.register("v1.issuing_authorization.created", callback); @@ -1341,33 +1676,81 @@ public T onV1PlanUpdated(EventNotificationCallback callback) { + this.register("v1.price.activated", callback); + return self(); + } + public T onV1PriceCreated(EventNotificationCallback callback) { this.register("v1.price.created", callback); return self(); } + public T onV1PriceDeactivated( + EventNotificationCallback callback) { + this.register("v1.price.deactivated", callback); + return self(); + } + public T onV1PriceDeleted(EventNotificationCallback callback) { this.register("v1.price.deleted", callback); return self(); } + public T onV1PriceLookupKeyChanged( + EventNotificationCallback callback) { + this.register("v1.price.lookup_key_changed", callback); + return self(); + } + + public T onV1PriceTaxBehaviorChanged( + EventNotificationCallback callback) { + this.register("v1.price.tax_behavior_changed", callback); + return self(); + } + public T onV1PriceUpdated(EventNotificationCallback callback) { this.register("v1.price.updated", callback); return self(); } + public T onV1ProductActivated( + EventNotificationCallback callback) { + this.register("v1.product.activated", callback); + return self(); + } + public T onV1ProductCreated( EventNotificationCallback callback) { this.register("v1.product.created", callback); return self(); } + public T onV1ProductDeactivated( + EventNotificationCallback callback) { + this.register("v1.product.deactivated", callback); + return self(); + } + + public T onV1ProductDefaultPriceChanged( + EventNotificationCallback callback) { + this.register("v1.product.default_price_changed", callback); + return self(); + } + public T onV1ProductDeleted( EventNotificationCallback callback) { this.register("v1.product.deleted", callback); return self(); } + public T onV1ProductTaxCodeChanged( + EventNotificationCallback callback) { + this.register("v1.product.tax_code_changed", callback); + return self(); + } + public T onV1ProductUpdated( EventNotificationCallback callback) { this.register("v1.product.updated", callback); @@ -1380,6 +1763,12 @@ public T onV1PromotionCodeCreated( return self(); } + public T onV1PromotionCodeFullyRedeemed( + EventNotificationCallback callback) { + this.register("v1.promotion_code.fully_redeemed", callback); + return self(); + } + public T onV1PromotionCodeUpdated( EventNotificationCallback callback) { this.register("v1.promotion_code.updated", callback); @@ -1533,6 +1922,39 @@ public T onV1SubscriptionScheduleExpiring( return self(); } + public T onV1SubscriptionSchedulePhaseAdded( + EventNotificationCallback callback) { + this.register("v1.subscription_schedule.phase_added", callback); + return self(); + } + + public T onV1SubscriptionSchedulePhaseDefaultTaxRatesChanged( + EventNotificationCallback + callback) { + this.register("v1.subscription_schedule.phase_default_tax_rates_changed", callback); + return self(); + } + + public T onV1SubscriptionSchedulePhaseEndDateChanged( + EventNotificationCallback + callback) { + this.register("v1.subscription_schedule.phase_end_date_changed", callback); + return self(); + } + + public T onV1SubscriptionSchedulePhaseRemoved( + EventNotificationCallback callback) { + this.register("v1.subscription_schedule.phase_removed", callback); + return self(); + } + + public T onV1SubscriptionSchedulePhaseTrialEndChanged( + EventNotificationCallback + callback) { + this.register("v1.subscription_schedule.phase_trial_end_changed", callback); + return self(); + } + public T onV1SubscriptionScheduleReleased( EventNotificationCallback callback) { this.register("v1.subscription_schedule.released", callback); @@ -1801,6 +2223,239 @@ public T onV2CoreEventDestinationPing( this.register("v2.core.event_destination.ping", callback); return self(); } + + public T onV2MoneyManagementAdjustmentCreated( + EventNotificationCallback callback) { + this.register("v2.money_management.adjustment.created", callback); + return self(); + } + + public T onV2MoneyManagementFinancialAccountCreated( + EventNotificationCallback + callback) { + this.register("v2.money_management.financial_account.created", callback); + return self(); + } + + public T onV2MoneyManagementFinancialAccountUpdated( + EventNotificationCallback + callback) { + this.register("v2.money_management.financial_account.updated", callback); + return self(); + } + + public T onV2MoneyManagementFinancialAddressActivated( + EventNotificationCallback + callback) { + this.register("v2.money_management.financial_address.activated", callback); + return self(); + } + + public T onV2MoneyManagementFinancialAddressFailed( + EventNotificationCallback + callback) { + this.register("v2.money_management.financial_address.failed", callback); + return self(); + } + + public T onV2MoneyManagementInboundTransferAvailable( + EventNotificationCallback + callback) { + this.register("v2.money_management.inbound_transfer.available", callback); + return self(); + } + + public T onV2MoneyManagementInboundTransferBankDebitFailed( + EventNotificationCallback + callback) { + this.register("v2.money_management.inbound_transfer.bank_debit_failed", callback); + return self(); + } + + public T onV2MoneyManagementInboundTransferBankDebitProcessing( + EventNotificationCallback< + V2MoneyManagementInboundTransferBankDebitProcessingEventNotification> + callback) { + this.register("v2.money_management.inbound_transfer.bank_debit_processing", callback); + return self(); + } + + public T onV2MoneyManagementInboundTransferBankDebitQueued( + EventNotificationCallback + callback) { + this.register("v2.money_management.inbound_transfer.bank_debit_queued", callback); + return self(); + } + + public T onV2MoneyManagementInboundTransferBankDebitReturned( + EventNotificationCallback + callback) { + this.register("v2.money_management.inbound_transfer.bank_debit_returned", callback); + return self(); + } + + public T onV2MoneyManagementInboundTransferBankDebitSucceeded( + EventNotificationCallback + callback) { + this.register("v2.money_management.inbound_transfer.bank_debit_succeeded", callback); + return self(); + } + + public T onV2MoneyManagementOutboundPaymentCanceled( + EventNotificationCallback + callback) { + this.register("v2.money_management.outbound_payment.canceled", callback); + return self(); + } + + public T onV2MoneyManagementOutboundPaymentCreated( + EventNotificationCallback + callback) { + this.register("v2.money_management.outbound_payment.created", callback); + return self(); + } + + public T onV2MoneyManagementOutboundPaymentFailed( + EventNotificationCallback callback) { + this.register("v2.money_management.outbound_payment.failed", callback); + return self(); + } + + public T onV2MoneyManagementOutboundPaymentPosted( + EventNotificationCallback callback) { + this.register("v2.money_management.outbound_payment.posted", callback); + return self(); + } + + public T onV2MoneyManagementOutboundPaymentReturned( + EventNotificationCallback + callback) { + this.register("v2.money_management.outbound_payment.returned", callback); + return self(); + } + + public T onV2MoneyManagementOutboundPaymentUnderReview( + EventNotificationCallback + callback) { + this.register("v2.money_management.outbound_payment.under_review", callback); + return self(); + } + + public T onV2MoneyManagementOutboundPaymentUpdated( + EventNotificationCallback + callback) { + this.register("v2.money_management.outbound_payment.updated", callback); + return self(); + } + + public T onV2MoneyManagementPayoutIntentCanceled( + EventNotificationCallback callback) { + this.register("v2.money_management.payout_intent.canceled", callback); + return self(); + } + + public T onV2MoneyManagementPayoutIntentCreated( + EventNotificationCallback callback) { + this.register("v2.money_management.payout_intent.created", callback); + return self(); + } + + public T onV2MoneyManagementPayoutIntentPending( + EventNotificationCallback callback) { + this.register("v2.money_management.payout_intent.pending", callback); + return self(); + } + + public T onV2MoneyManagementPayoutIntentPosted( + EventNotificationCallback callback) { + this.register("v2.money_management.payout_intent.posted", callback); + return self(); + } + + public T onV2MoneyManagementPayoutIntentProcessing( + EventNotificationCallback + callback) { + this.register("v2.money_management.payout_intent.processing", callback); + return self(); + } + + public T onV2MoneyManagementPayoutIntentRequiresAction( + EventNotificationCallback + callback) { + this.register("v2.money_management.payout_intent.requires_action", callback); + return self(); + } + + public T onV2MoneyManagementPayoutIntentUpdated( + EventNotificationCallback callback) { + this.register("v2.money_management.payout_intent.updated", callback); + return self(); + } + + public T onV2MoneyManagementPayoutMethodCreated( + EventNotificationCallback callback) { + this.register("v2.money_management.payout_method.created", callback); + return self(); + } + + public T onV2MoneyManagementPayoutMethodUpdated( + EventNotificationCallback callback) { + this.register("v2.money_management.payout_method.updated", callback); + return self(); + } + + public T onV2MoneyManagementReceivedCreditAvailable( + EventNotificationCallback + callback) { + this.register("v2.money_management.received_credit.available", callback); + return self(); + } + + public T onV2MoneyManagementReceivedCreditFailed( + EventNotificationCallback callback) { + this.register("v2.money_management.received_credit.failed", callback); + return self(); + } + + public T onV2MoneyManagementReceivedCreditReturned( + EventNotificationCallback + callback) { + this.register("v2.money_management.received_credit.returned", callback); + return self(); + } + + public T onV2MoneyManagementReceivedCreditSucceeded( + EventNotificationCallback + callback) { + this.register("v2.money_management.received_credit.succeeded", callback); + return self(); + } + + public T onV2MoneyManagementRecipientVerificationCreated( + EventNotificationCallback + callback) { + this.register("v2.money_management.recipient_verification.created", callback); + return self(); + } + + public T onV2MoneyManagementRecipientVerificationUpdated( + EventNotificationCallback + callback) { + this.register("v2.money_management.recipient_verification.updated", callback); + return self(); + } + + public T onV2MoneyManagementTransactionCreated( + EventNotificationCallback callback) { + this.register("v2.money_management.transaction.created", callback); + return self(); + } + + public T onV2MoneyManagementTransactionUpdated( + EventNotificationCallback callback) { + this.register("v2.money_management.transaction.updated", callback); + return self(); + } // notification-handler-methods: The end of the section generated from our OpenAPI spec /** diff --git a/src/main/java/com/stripe/events/V1CustomerDiscountSourceChangedEvent.java b/src/main/java/com/stripe/events/V1CustomerDiscountSourceChangedEvent.java new file mode 100644 index 000000000000..bcb3aa369558 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerDiscountSourceChangedEvent.java @@ -0,0 +1,6 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.model.v2.core.Event; + +public final class V1CustomerDiscountSourceChangedEvent extends Event {} diff --git a/src/main/java/com/stripe/events/V1CustomerDiscountSourceChangedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerDiscountSourceChangedEventNotification.java new file mode 100644 index 000000000000..d179235aac96 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerDiscountSourceChangedEventNotification.java @@ -0,0 +1,13 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.EventNotification; + +public final class V1CustomerDiscountSourceChangedEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerDiscountSourceChangedEvent fetchEvent() throws StripeException { + return (V1CustomerDiscountSourceChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionActiveEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionActiveEvent.java new file mode 100644 index 000000000000..f5c2ceda94da --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionActiveEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionActiveEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionActiveEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionActiveEventNotification.java new file mode 100644 index 000000000000..45bde5165762 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionActiveEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionActiveEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionActiveEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionActiveEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionCancelAtChangedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionCancelAtChangedEvent.java new file mode 100644 index 000000000000..c36114692a85 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionCancelAtChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionCancelAtChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionCancelAtChangedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionCancelAtChangedEventNotification.java new file mode 100644 index 000000000000..a7a336388c1b --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionCancelAtChangedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionCancelAtChangedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionCancelAtChangedEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionCancelAtChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionDefaultPaymentMethodChangedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionDefaultPaymentMethodChangedEvent.java new file mode 100644 index 000000000000..465c7a37fbc1 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionDefaultPaymentMethodChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionDefaultPaymentMethodChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification.java new file mode 100644 index 000000000000..3b8ebff6f666 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionDefaultPaymentMethodChangedEvent fetchEvent() + throws StripeException { + return (V1CustomerSubscriptionDefaultPaymentMethodChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionIncompleteEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionIncompleteEvent.java new file mode 100644 index 000000000000..91b84a296302 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionIncompleteEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionIncompleteEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionIncompleteEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionIncompleteEventNotification.java new file mode 100644 index 000000000000..fafc58ee221e --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionIncompleteEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionIncompleteEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionIncompleteEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionIncompleteEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionIncompleteExpiredEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionIncompleteExpiredEvent.java new file mode 100644 index 000000000000..fb9e4829a2e0 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionIncompleteExpiredEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionIncompleteExpiredEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionIncompleteExpiredEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionIncompleteExpiredEventNotification.java new file mode 100644 index 000000000000..44714fa58c61 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionIncompleteExpiredEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionIncompleteExpiredEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionIncompleteExpiredEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionIncompleteExpiredEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionItemAddedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemAddedEvent.java new file mode 100644 index 000000000000..e4b1c83a07a4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemAddedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionItemAddedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionItemAddedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemAddedEventNotification.java new file mode 100644 index 000000000000..1b2bb2ac89b0 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemAddedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionItemAddedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionItemAddedEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionItemAddedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionItemPriceChangedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemPriceChangedEvent.java new file mode 100644 index 000000000000..c2cb5662ba6a --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemPriceChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionItemPriceChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionItemPriceChangedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemPriceChangedEventNotification.java new file mode 100644 index 000000000000..cab88fc6cedf --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemPriceChangedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionItemPriceChangedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionItemPriceChangedEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionItemPriceChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionItemQuantityChangedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemQuantityChangedEvent.java new file mode 100644 index 000000000000..ea7f6a18f476 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemQuantityChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionItemQuantityChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionItemQuantityChangedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemQuantityChangedEventNotification.java new file mode 100644 index 000000000000..877e6c32a5ea --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemQuantityChangedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionItemQuantityChangedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionItemQuantityChangedEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionItemQuantityChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionItemRemovedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemRemovedEvent.java new file mode 100644 index 000000000000..d3714b354845 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemRemovedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionItemRemovedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionItemRemovedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemRemovedEventNotification.java new file mode 100644 index 000000000000..7af5a2c5ebec --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemRemovedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionItemRemovedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionItemRemovedEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionItemRemovedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionItemTaxRatesChangedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemTaxRatesChangedEvent.java new file mode 100644 index 000000000000..0c9730705439 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemTaxRatesChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionItemTaxRatesChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionItemTaxRatesChangedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemTaxRatesChangedEventNotification.java new file mode 100644 index 000000000000..af4398e92b8b --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionItemTaxRatesChangedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionItemTaxRatesChangedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionItemTaxRatesChangedEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionItemTaxRatesChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionPastDueEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionPastDueEvent.java new file mode 100644 index 000000000000..1301fec100e6 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionPastDueEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionPastDueEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionPastDueEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionPastDueEventNotification.java new file mode 100644 index 000000000000..882569dbb59e --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionPastDueEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionPastDueEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionPastDueEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionPastDueEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialingEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialingEvent.java new file mode 100644 index 000000000000..0b2265f3db0d --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialingEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionTrialingEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialingEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialingEventNotification.java new file mode 100644 index 000000000000..5356847a02fd --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialingEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionTrialingEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionTrialingEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionTrialingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionUnpaidEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionUnpaidEvent.java new file mode 100644 index 000000000000..b23f3bedf3db --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionUnpaidEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionUnpaidEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionUnpaidEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionUnpaidEventNotification.java new file mode 100644 index 000000000000..7fec58f75e54 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionUnpaidEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Subscription; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionUnpaidEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionUnpaidEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionUnpaidEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent.java b/src/main/java/com/stripe/events/V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent.java new file mode 100644 index 000000000000..2d2dfd397501 --- /dev/null +++ b/src/main/java/com/stripe/events/V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent.java @@ -0,0 +1,6 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.model.v2.core.Event; + +public final class V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent extends Event {} diff --git a/src/main/java/com/stripe/events/V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification.java b/src/main/java/com/stripe/events/V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification.java new file mode 100644 index 000000000000..42a59f1c4f0e --- /dev/null +++ b/src/main/java/com/stripe/events/V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.EventNotification; + +public final class V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification + extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent fetchEvent() + throws StripeException { + return (V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent.java b/src/main/java/com/stripe/events/V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent.java new file mode 100644 index 000000000000..9fdfc13e2361 --- /dev/null +++ b/src/main/java/com/stripe/events/V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent.java @@ -0,0 +1,6 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.model.v2.core.Event; + +public final class V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent extends Event {} diff --git a/src/main/java/com/stripe/events/V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification.java b/src/main/java/com/stripe/events/V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification.java new file mode 100644 index 000000000000..e97ee9fa5ad4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.EventNotification; + +public final class V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification + extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent fetchEvent() + throws StripeException { + return (V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountBalanceRefreshFailedEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountBalanceRefreshFailedEvent.java new file mode 100644 index 000000000000..007edd0c7a38 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountBalanceRefreshFailedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountBalanceRefreshFailedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification.java new file mode 100644 index 000000000000..ec22981dcf18 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1FinancialConnectionsAccountBalanceRefreshFailedEvent fetchEvent() + throws StripeException { + return (V1FinancialConnectionsAccountBalanceRefreshFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountBalanceRefreshSucceededEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountBalanceRefreshSucceededEvent.java new file mode 100644 index 000000000000..d27cc556d56c --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountBalanceRefreshSucceededEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountBalanceRefreshSucceededEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification.java new file mode 100644 index 000000000000..4a8efcb1a78b --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1FinancialConnectionsAccountBalanceRefreshSucceededEvent fetchEvent() + throws StripeException { + return (V1FinancialConnectionsAccountBalanceRefreshSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent.java new file mode 100644 index 000000000000..28a630d20348 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification.java new file mode 100644 index 000000000000..79dc2303f7f3 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent fetchEvent() + throws StripeException { + return (V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent.java new file mode 100644 index 000000000000..5d202b719f5f --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent.java @@ -0,0 +1,23 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent + extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification.java new file mode 100644 index 000000000000..43b619b07cd8 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent fetchEvent() + throws StripeException { + return (V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountOwnershipRefreshFailedEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountOwnershipRefreshFailedEvent.java new file mode 100644 index 000000000000..a44974e44ced --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountOwnershipRefreshFailedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountOwnershipRefreshFailedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification.java new file mode 100644 index 000000000000..172d21d4d3b2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1FinancialConnectionsAccountOwnershipRefreshFailedEvent fetchEvent() + throws StripeException { + return (V1FinancialConnectionsAccountOwnershipRefreshFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent.java new file mode 100644 index 000000000000..84d1c1d136c2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification.java new file mode 100644 index 000000000000..9c50ea308a9e --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent fetchEvent() + throws StripeException { + return (V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent.java new file mode 100644 index 000000000000..ba02e2e003db --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification.java new file mode 100644 index 000000000000..29bc14406c96 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent fetchEvent() + throws StripeException { + return (V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent.java new file mode 100644 index 000000000000..548dd793006f --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent.java @@ -0,0 +1,23 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent + extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification.java new file mode 100644 index 000000000000..4251aa22e9d5 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent fetchEvent() + throws StripeException { + return (V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountTransactionsRefreshFailedEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountTransactionsRefreshFailedEvent.java new file mode 100644 index 000000000000..fea9f714762a --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountTransactionsRefreshFailedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountTransactionsRefreshFailedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification.java new file mode 100644 index 000000000000..71bde84ec676 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1FinancialConnectionsAccountTransactionsRefreshFailedEvent fetchEvent() + throws StripeException { + return (V1FinancialConnectionsAccountTransactionsRefreshFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent.java new file mode 100644 index 000000000000..476be823e3c3 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification.java new file mode 100644 index 000000000000..f7df93ab866e --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent fetchEvent() + throws StripeException { + return (V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceDiscountAddedEvent.java b/src/main/java/com/stripe/events/V1InvoiceDiscountAddedEvent.java new file mode 100644 index 000000000000..459e07ad45bb --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceDiscountAddedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Invoice; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1InvoiceDiscountAddedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceDiscountAddedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceDiscountAddedEventNotification.java new file mode 100644 index 000000000000..54539ac5f3a3 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceDiscountAddedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Invoice; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceDiscountAddedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceDiscountAddedEvent fetchEvent() throws StripeException { + return (V1InvoiceDiscountAddedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceDiscountRemovedEvent.java b/src/main/java/com/stripe/events/V1InvoiceDiscountRemovedEvent.java new file mode 100644 index 000000000000..6c3cad84c20c --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceDiscountRemovedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Invoice; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1InvoiceDiscountRemovedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceDiscountRemovedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceDiscountRemovedEventNotification.java new file mode 100644 index 000000000000..5f7e9c4abbd2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceDiscountRemovedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Invoice; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceDiscountRemovedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceDiscountRemovedEvent fetchEvent() throws StripeException { + return (V1InvoiceDiscountRemovedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceLineItemAddedEvent.java b/src/main/java/com/stripe/events/V1InvoiceLineItemAddedEvent.java new file mode 100644 index 000000000000..3f259ff8a649 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceLineItemAddedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Invoice; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1InvoiceLineItemAddedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceLineItemAddedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceLineItemAddedEventNotification.java new file mode 100644 index 000000000000..3eaec909faba --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceLineItemAddedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Invoice; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceLineItemAddedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceLineItemAddedEvent fetchEvent() throws StripeException { + return (V1InvoiceLineItemAddedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceLineItemPricingChangedEvent.java b/src/main/java/com/stripe/events/V1InvoiceLineItemPricingChangedEvent.java new file mode 100644 index 000000000000..c060d8496a13 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceLineItemPricingChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Invoice; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1InvoiceLineItemPricingChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceLineItemPricingChangedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceLineItemPricingChangedEventNotification.java new file mode 100644 index 000000000000..d9bcce82c433 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceLineItemPricingChangedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Invoice; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceLineItemPricingChangedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceLineItemPricingChangedEvent fetchEvent() throws StripeException { + return (V1InvoiceLineItemPricingChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceLineItemQuantityChangedEvent.java b/src/main/java/com/stripe/events/V1InvoiceLineItemQuantityChangedEvent.java new file mode 100644 index 000000000000..ee1e3339b398 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceLineItemQuantityChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Invoice; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1InvoiceLineItemQuantityChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceLineItemQuantityChangedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceLineItemQuantityChangedEventNotification.java new file mode 100644 index 000000000000..6a9ab8e4fec3 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceLineItemQuantityChangedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Invoice; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceLineItemQuantityChangedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceLineItemQuantityChangedEvent fetchEvent() throws StripeException { + return (V1InvoiceLineItemQuantityChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceLineItemRemovedEvent.java b/src/main/java/com/stripe/events/V1InvoiceLineItemRemovedEvent.java new file mode 100644 index 000000000000..350d5721724c --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceLineItemRemovedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Invoice; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1InvoiceLineItemRemovedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceLineItemRemovedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceLineItemRemovedEventNotification.java new file mode 100644 index 000000000000..37ee39cd3495 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceLineItemRemovedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Invoice; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceLineItemRemovedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceLineItemRemovedEvent fetchEvent() throws StripeException { + return (V1InvoiceLineItemRemovedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentCanceledEvent.java b/src/main/java/com/stripe/events/V1InvoicePaymentCanceledEvent.java new file mode 100644 index 000000000000..8af861798bb0 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaymentCanceledEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.InvoicePayment; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1InvoicePaymentCanceledEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InvoicePayment fetchRelatedObject() throws StripeException { + return (InvoicePayment) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentCanceledEventNotification.java b/src/main/java/com/stripe/events/V1InvoicePaymentCanceledEventNotification.java new file mode 100644 index 000000000000..5614ba682cac --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaymentCanceledEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.InvoicePayment; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoicePaymentCanceledEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InvoicePayment fetchRelatedObject() throws StripeException { + return (InvoicePayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoicePaymentCanceledEvent fetchEvent() throws StripeException { + return (V1InvoicePaymentCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentOpenEvent.java b/src/main/java/com/stripe/events/V1InvoicePaymentOpenEvent.java new file mode 100644 index 000000000000..95a94bd6f560 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaymentOpenEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.InvoicePayment; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1InvoicePaymentOpenEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InvoicePayment fetchRelatedObject() throws StripeException { + return (InvoicePayment) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentOpenEventNotification.java b/src/main/java/com/stripe/events/V1InvoicePaymentOpenEventNotification.java new file mode 100644 index 000000000000..e32881d68ee7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaymentOpenEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.InvoicePayment; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoicePaymentOpenEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InvoicePayment fetchRelatedObject() throws StripeException { + return (InvoicePayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoicePaymentOpenEvent fetchEvent() throws StripeException { + return (V1InvoicePaymentOpenEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceUpcomingEvent.java b/src/main/java/com/stripe/events/V1InvoiceUpcomingEvent.java index 7a9691db39df..512c849037e3 100644 --- a/src/main/java/com/stripe/events/V1InvoiceUpcomingEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceUpcomingEvent.java @@ -1,6 +1,25 @@ // File generated from our OpenAPI spec package com.stripe.events; +import com.google.gson.annotations.SerializedName; import com.stripe.model.v2.core.Event; +import lombok.Getter; +import lombok.Setter; -public final class V1InvoiceUpcomingEvent extends Event {} +@Getter +public final class V1InvoiceUpcomingEvent extends Event { + /** Data for the v1.invoice.upcoming event. */ + @SerializedName("data") + V1InvoiceUpcomingEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The ID of the customer this upcoming invoice is associated with. */ + @SerializedName("customer") + String customer; + /** The ID of the subscription, if any. */ + @SerializedName("subscription") + String subscription; + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceitemAmountChangedEvent.java b/src/main/java/com/stripe/events/V1InvoiceitemAmountChangedEvent.java new file mode 100644 index 000000000000..b76d78f4ff10 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceitemAmountChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.InvoiceItem; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1InvoiceitemAmountChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InvoiceItem fetchRelatedObject() throws StripeException { + return (InvoiceItem) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceitemAmountChangedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceitemAmountChangedEventNotification.java new file mode 100644 index 000000000000..dd3514ff420f --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceitemAmountChangedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.InvoiceItem; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceitemAmountChangedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InvoiceItem fetchRelatedObject() throws StripeException { + return (InvoiceItem) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceitemAmountChangedEvent fetchEvent() throws StripeException { + return (V1InvoiceitemAmountChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceitemDiscountAddedEvent.java b/src/main/java/com/stripe/events/V1InvoiceitemDiscountAddedEvent.java new file mode 100644 index 000000000000..b0d842f470bc --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceitemDiscountAddedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.InvoiceItem; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1InvoiceitemDiscountAddedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InvoiceItem fetchRelatedObject() throws StripeException { + return (InvoiceItem) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceitemDiscountAddedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceitemDiscountAddedEventNotification.java new file mode 100644 index 000000000000..f874d76fa054 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceitemDiscountAddedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.InvoiceItem; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceitemDiscountAddedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InvoiceItem fetchRelatedObject() throws StripeException { + return (InvoiceItem) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceitemDiscountAddedEvent fetchEvent() throws StripeException { + return (V1InvoiceitemDiscountAddedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceitemDiscountRemovedEvent.java b/src/main/java/com/stripe/events/V1InvoiceitemDiscountRemovedEvent.java new file mode 100644 index 000000000000..5607118cd20f --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceitemDiscountRemovedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.InvoiceItem; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1InvoiceitemDiscountRemovedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InvoiceItem fetchRelatedObject() throws StripeException { + return (InvoiceItem) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceitemDiscountRemovedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceitemDiscountRemovedEventNotification.java new file mode 100644 index 000000000000..a9dc2d6e4daa --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceitemDiscountRemovedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.InvoiceItem; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceitemDiscountRemovedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InvoiceItem fetchRelatedObject() throws StripeException { + return (InvoiceItem) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceitemDiscountRemovedEvent fetchEvent() throws StripeException { + return (V1InvoiceitemDiscountRemovedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceActivatedEvent.java b/src/main/java/com/stripe/events/V1PriceActivatedEvent.java new file mode 100644 index 000000000000..2ee052f0d3b8 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceActivatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Price; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1PriceActivatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceActivatedEventNotification.java b/src/main/java/com/stripe/events/V1PriceActivatedEventNotification.java new file mode 100644 index 000000000000..41301bab8445 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceActivatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Price; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PriceActivatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PriceActivatedEvent fetchEvent() throws StripeException { + return (V1PriceActivatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceDeactivatedEvent.java b/src/main/java/com/stripe/events/V1PriceDeactivatedEvent.java new file mode 100644 index 000000000000..8ac558325f5c --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceDeactivatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Price; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1PriceDeactivatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceDeactivatedEventNotification.java b/src/main/java/com/stripe/events/V1PriceDeactivatedEventNotification.java new file mode 100644 index 000000000000..337157db4897 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceDeactivatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Price; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PriceDeactivatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PriceDeactivatedEvent fetchEvent() throws StripeException { + return (V1PriceDeactivatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceLookupKeyChangedEvent.java b/src/main/java/com/stripe/events/V1PriceLookupKeyChangedEvent.java new file mode 100644 index 000000000000..2642a0d3b39a --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceLookupKeyChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Price; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1PriceLookupKeyChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceLookupKeyChangedEventNotification.java b/src/main/java/com/stripe/events/V1PriceLookupKeyChangedEventNotification.java new file mode 100644 index 000000000000..52d404bd7249 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceLookupKeyChangedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Price; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PriceLookupKeyChangedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PriceLookupKeyChangedEvent fetchEvent() throws StripeException { + return (V1PriceLookupKeyChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceTaxBehaviorChangedEvent.java b/src/main/java/com/stripe/events/V1PriceTaxBehaviorChangedEvent.java new file mode 100644 index 000000000000..ee08ee7afa5e --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceTaxBehaviorChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Price; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1PriceTaxBehaviorChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceTaxBehaviorChangedEventNotification.java b/src/main/java/com/stripe/events/V1PriceTaxBehaviorChangedEventNotification.java new file mode 100644 index 000000000000..4e6345b0e2d3 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceTaxBehaviorChangedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Price; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PriceTaxBehaviorChangedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PriceTaxBehaviorChangedEvent fetchEvent() throws StripeException { + return (V1PriceTaxBehaviorChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductActivatedEvent.java b/src/main/java/com/stripe/events/V1ProductActivatedEvent.java new file mode 100644 index 000000000000..9f9b45ba6d47 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductActivatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Product; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1ProductActivatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductActivatedEventNotification.java b/src/main/java/com/stripe/events/V1ProductActivatedEventNotification.java new file mode 100644 index 000000000000..1bc3a0f10e2a --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductActivatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Product; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ProductActivatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ProductActivatedEvent fetchEvent() throws StripeException { + return (V1ProductActivatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductDeactivatedEvent.java b/src/main/java/com/stripe/events/V1ProductDeactivatedEvent.java new file mode 100644 index 000000000000..6ac141b7fb96 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductDeactivatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Product; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1ProductDeactivatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductDeactivatedEventNotification.java b/src/main/java/com/stripe/events/V1ProductDeactivatedEventNotification.java new file mode 100644 index 000000000000..3ba162ad2b9e --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductDeactivatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Product; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ProductDeactivatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ProductDeactivatedEvent fetchEvent() throws StripeException { + return (V1ProductDeactivatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductDefaultPriceChangedEvent.java b/src/main/java/com/stripe/events/V1ProductDefaultPriceChangedEvent.java new file mode 100644 index 000000000000..e228fab9c37d --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductDefaultPriceChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Product; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1ProductDefaultPriceChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductDefaultPriceChangedEventNotification.java b/src/main/java/com/stripe/events/V1ProductDefaultPriceChangedEventNotification.java new file mode 100644 index 000000000000..b1437595d8ba --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductDefaultPriceChangedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Product; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ProductDefaultPriceChangedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ProductDefaultPriceChangedEvent fetchEvent() throws StripeException { + return (V1ProductDefaultPriceChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductTaxCodeChangedEvent.java b/src/main/java/com/stripe/events/V1ProductTaxCodeChangedEvent.java new file mode 100644 index 000000000000..a1f71211624a --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductTaxCodeChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Product; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1ProductTaxCodeChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductTaxCodeChangedEventNotification.java b/src/main/java/com/stripe/events/V1ProductTaxCodeChangedEventNotification.java new file mode 100644 index 000000000000..83b33a6c91e6 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductTaxCodeChangedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Product; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ProductTaxCodeChangedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ProductTaxCodeChangedEvent fetchEvent() throws StripeException { + return (V1ProductTaxCodeChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PromotionCodeFullyRedeemedEvent.java b/src/main/java/com/stripe/events/V1PromotionCodeFullyRedeemedEvent.java new file mode 100644 index 000000000000..f36e1780caf5 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PromotionCodeFullyRedeemedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.PromotionCode; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1PromotionCodeFullyRedeemedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PromotionCode fetchRelatedObject() throws StripeException { + return (PromotionCode) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PromotionCodeFullyRedeemedEventNotification.java b/src/main/java/com/stripe/events/V1PromotionCodeFullyRedeemedEventNotification.java new file mode 100644 index 000000000000..5e9434ab141d --- /dev/null +++ b/src/main/java/com/stripe/events/V1PromotionCodeFullyRedeemedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.PromotionCode; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PromotionCodeFullyRedeemedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PromotionCode fetchRelatedObject() throws StripeException { + return (PromotionCode) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PromotionCodeFullyRedeemedEvent fetchEvent() throws StripeException { + return (V1PromotionCodeFullyRedeemedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseAddedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseAddedEvent.java new file mode 100644 index 000000000000..c641c5525236 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseAddedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.SubscriptionSchedule; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1SubscriptionSchedulePhaseAddedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseAddedEventNotification.java b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseAddedEventNotification.java new file mode 100644 index 000000000000..fca90fca74cf --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseAddedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.SubscriptionSchedule; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SubscriptionSchedulePhaseAddedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SubscriptionSchedulePhaseAddedEvent fetchEvent() throws StripeException { + return (V1SubscriptionSchedulePhaseAddedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent.java new file mode 100644 index 000000000000..144983953ac2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.SubscriptionSchedule; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification.java b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification.java new file mode 100644 index 000000000000..4c0a91366379 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.SubscriptionSchedule; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent fetchEvent() + throws StripeException { + return (V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseEndDateChangedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseEndDateChangedEvent.java new file mode 100644 index 000000000000..1d09b505f03c --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseEndDateChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.SubscriptionSchedule; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1SubscriptionSchedulePhaseEndDateChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseEndDateChangedEventNotification.java b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseEndDateChangedEventNotification.java new file mode 100644 index 000000000000..4fbc79460f88 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseEndDateChangedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.SubscriptionSchedule; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SubscriptionSchedulePhaseEndDateChangedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SubscriptionSchedulePhaseEndDateChangedEvent fetchEvent() throws StripeException { + return (V1SubscriptionSchedulePhaseEndDateChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseRemovedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseRemovedEvent.java new file mode 100644 index 000000000000..9292edac3648 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseRemovedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.SubscriptionSchedule; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1SubscriptionSchedulePhaseRemovedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseRemovedEventNotification.java b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseRemovedEventNotification.java new file mode 100644 index 000000000000..fc1b32d49f40 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseRemovedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.SubscriptionSchedule; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SubscriptionSchedulePhaseRemovedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SubscriptionSchedulePhaseRemovedEvent fetchEvent() throws StripeException { + return (V1SubscriptionSchedulePhaseRemovedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseTrialEndChangedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseTrialEndChangedEvent.java new file mode 100644 index 000000000000..9813f848e1fc --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseTrialEndChangedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.SubscriptionSchedule; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V1SubscriptionSchedulePhaseTrialEndChangedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseTrialEndChangedEventNotification.java b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseTrialEndChangedEventNotification.java new file mode 100644 index 000000000000..3622920fd146 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionSchedulePhaseTrialEndChangedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.SubscriptionSchedule; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SubscriptionSchedulePhaseTrialEndChangedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SubscriptionSchedulePhaseTrialEndChangedEvent fetchEvent() throws StripeException { + return (V1SubscriptionSchedulePhaseTrialEndChangedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java index fda9a61e76d3..ab314bed5e5f 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java @@ -22,8 +22,10 @@ public static final class EventData { /** * Open Enum. The capability which had its status updated. * - *

One of {@code bank_accounts.local}, {@code bank_accounts.wire}, {@code cards}, {@code - * stripe_balance.payouts}, {@code stripe_balance.stripe_transfers}, or {@code + *

One of {@code bank_accounts.ach}, {@code bank_accounts.fedwire}, {@code + * bank_accounts.fps}, {@code bank_accounts.local}, {@code bank_accounts.rtp}, {@code + * bank_accounts.sepa}, {@code bank_accounts.swift}, {@code bank_accounts.wire}, {@code cards}, + * {@code stripe_balance.payouts}, {@code stripe_balance.stripe_transfers}, or {@code * stripe.transfers}. */ @SerializedName("updated_capability") diff --git a/src/main/java/com/stripe/events/V2MoneyManagementAdjustmentCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementAdjustmentCreatedEvent.java new file mode 100644 index 000000000000..150eedd5758b --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementAdjustmentCreatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.Adjustment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementAdjustmentCreatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Adjustment fetchRelatedObject() throws StripeException { + return (Adjustment) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementAdjustmentCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementAdjustmentCreatedEventNotification.java new file mode 100644 index 000000000000..7da6ec144c8e --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementAdjustmentCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.Adjustment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementAdjustmentCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Adjustment fetchRelatedObject() throws StripeException { + return (Adjustment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementAdjustmentCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementAdjustmentCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountCreatedEvent.java new file mode 100644 index 000000000000..627907bd85f2 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountCreatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.FinancialAccount; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementFinancialAccountCreatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public FinancialAccount fetchRelatedObject() throws StripeException { + return (FinancialAccount) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountCreatedEventNotification.java new file mode 100644 index 000000000000..8806697d5bbc --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountCreatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.FinancialAccount; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementFinancialAccountCreatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public FinancialAccount fetchRelatedObject() throws StripeException { + return (FinancialAccount) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementFinancialAccountCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementFinancialAccountCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountUpdatedEvent.java new file mode 100644 index 000000000000..54512d98645c --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.FinancialAccount; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementFinancialAccountUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public FinancialAccount fetchRelatedObject() throws StripeException { + return (FinancialAccount) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountUpdatedEventNotification.java new file mode 100644 index 000000000000..5aa0c841af1b --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.FinancialAccount; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementFinancialAccountUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public FinancialAccount fetchRelatedObject() throws StripeException { + return (FinancialAccount) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementFinancialAccountUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementFinancialAccountUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressActivatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressActivatedEvent.java new file mode 100644 index 000000000000..9630b7427ffd --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressActivatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.FinancialAddress; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementFinancialAddressActivatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public FinancialAddress fetchRelatedObject() throws StripeException { + return (FinancialAddress) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressActivatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressActivatedEventNotification.java new file mode 100644 index 000000000000..82a1ebaf9bcf --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressActivatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.FinancialAddress; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementFinancialAddressActivatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public FinancialAddress fetchRelatedObject() throws StripeException { + return (FinancialAddress) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementFinancialAddressActivatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementFinancialAddressActivatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressFailedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressFailedEvent.java new file mode 100644 index 000000000000..c3fc9bae4c81 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressFailedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.FinancialAddress; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementFinancialAddressFailedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public FinancialAddress fetchRelatedObject() throws StripeException { + return (FinancialAddress) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressFailedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressFailedEventNotification.java new file mode 100644 index 000000000000..7e7edf2dc135 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressFailedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.FinancialAddress; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementFinancialAddressFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public FinancialAddress fetchRelatedObject() throws StripeException { + return (FinancialAddress) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementFinancialAddressFailedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementFinancialAddressFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferAvailableEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferAvailableEvent.java new file mode 100644 index 000000000000..a1b713dfe63b --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferAvailableEvent.java @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2MoneyManagementInboundTransferAvailableEvent extends Event { + /** Data for the v2.money_management.inbound_transfer.available event. */ + @SerializedName("data") + V2MoneyManagementInboundTransferAvailableEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The transaction ID of the received credit. */ + @SerializedName("transaction_id") + String transactionId; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferAvailableEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferAvailableEventNotification.java new file mode 100644 index 000000000000..63b2e5a95f50 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferAvailableEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferAvailableEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementInboundTransferAvailableEvent fetchEvent() throws StripeException { + return (V2MoneyManagementInboundTransferAvailableEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitFailedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitFailedEvent.java new file mode 100644 index 000000000000..93ab1513cd36 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitFailedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitFailedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitFailedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitFailedEventNotification.java new file mode 100644 index 000000000000..3b7db567c51b --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitFailedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementInboundTransferBankDebitFailedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementInboundTransferBankDebitFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitProcessingEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitProcessingEvent.java new file mode 100644 index 000000000000..a9fb894b3e5d --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitProcessingEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitProcessingEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitProcessingEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitProcessingEventNotification.java new file mode 100644 index 000000000000..8bd92d3fb243 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitProcessingEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitProcessingEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementInboundTransferBankDebitProcessingEvent fetchEvent() + throws StripeException { + return (V2MoneyManagementInboundTransferBankDebitProcessingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitQueuedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitQueuedEvent.java new file mode 100644 index 000000000000..3ffae6df37dc --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitQueuedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitQueuedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitQueuedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitQueuedEventNotification.java new file mode 100644 index 000000000000..17fd8862e38f --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitQueuedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitQueuedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementInboundTransferBankDebitQueuedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementInboundTransferBankDebitQueuedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitReturnedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitReturnedEvent.java new file mode 100644 index 000000000000..f60b5dc52dd9 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitReturnedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitReturnedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitReturnedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitReturnedEventNotification.java new file mode 100644 index 000000000000..8c67878a08a8 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitReturnedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitReturnedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementInboundTransferBankDebitReturnedEvent fetchEvent() + throws StripeException { + return (V2MoneyManagementInboundTransferBankDebitReturnedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitSucceededEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitSucceededEvent.java new file mode 100644 index 000000000000..ab25d1235469 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitSucceededEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitSucceededEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitSucceededEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitSucceededEventNotification.java new file mode 100644 index 000000000000..a49f3569d0ef --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitSucceededEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitSucceededEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementInboundTransferBankDebitSucceededEvent fetchEvent() + throws StripeException { + return (V2MoneyManagementInboundTransferBankDebitSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCanceledEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCanceledEvent.java new file mode 100644 index 000000000000..e7b65c98d65e --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCanceledEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentCanceledEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCanceledEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCanceledEventNotification.java new file mode 100644 index 000000000000..19d11385b437 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCanceledEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentCanceledEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundPaymentCanceledEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundPaymentCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCreatedEvent.java new file mode 100644 index 000000000000..e5dbec23647e --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCreatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentCreatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCreatedEventNotification.java new file mode 100644 index 000000000000..7b95b98c7ba5 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCreatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentCreatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundPaymentCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundPaymentCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentFailedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentFailedEvent.java new file mode 100644 index 000000000000..20152e04b9bd --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentFailedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentFailedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentFailedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentFailedEventNotification.java new file mode 100644 index 000000000000..029244d06bd3 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentFailedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundPaymentFailedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundPaymentFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentPostedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentPostedEvent.java new file mode 100644 index 000000000000..1a16bcc38114 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentPostedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentPostedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentPostedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentPostedEventNotification.java new file mode 100644 index 000000000000..00112ab61008 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentPostedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentPostedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundPaymentPostedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundPaymentPostedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentReturnedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentReturnedEvent.java new file mode 100644 index 000000000000..f55c53910d22 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentReturnedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentReturnedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentReturnedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentReturnedEventNotification.java new file mode 100644 index 000000000000..189a9bfe2a81 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentReturnedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentReturnedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundPaymentReturnedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundPaymentReturnedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUnderReviewEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUnderReviewEvent.java new file mode 100644 index 000000000000..25be4c740583 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUnderReviewEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentUnderReviewEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUnderReviewEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUnderReviewEventNotification.java new file mode 100644 index 000000000000..4af42e7b1e77 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUnderReviewEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentUnderReviewEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundPaymentUnderReviewEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundPaymentUnderReviewEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUpdatedEvent.java new file mode 100644 index 000000000000..f4ef6a5b6631 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUpdatedEventNotification.java new file mode 100644 index 000000000000..d253f05383ed --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundPaymentUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundPaymentUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentCanceledEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentCanceledEvent.java new file mode 100644 index 000000000000..0d2c048bc77d --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentCanceledEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentCanceledEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentCanceledEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentCanceledEventNotification.java new file mode 100644 index 000000000000..963fb1c49ea5 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentCanceledEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentCanceledEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementPayoutIntentCanceledEvent fetchEvent() throws StripeException { + return (V2MoneyManagementPayoutIntentCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentCreatedEvent.java new file mode 100644 index 000000000000..5fd72ce3c478 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentCreatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentCreatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentCreatedEventNotification.java new file mode 100644 index 000000000000..e225124365e1 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementPayoutIntentCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementPayoutIntentCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentPendingEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentPendingEvent.java new file mode 100644 index 000000000000..8e3233d7c01e --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentPendingEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentPendingEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentPendingEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentPendingEventNotification.java new file mode 100644 index 000000000000..2666a1c26f42 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentPendingEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentPendingEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementPayoutIntentPendingEvent fetchEvent() throws StripeException { + return (V2MoneyManagementPayoutIntentPendingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentPostedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentPostedEvent.java new file mode 100644 index 000000000000..dee4dde7a95b --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentPostedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentPostedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentPostedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentPostedEventNotification.java new file mode 100644 index 000000000000..eb209905c2d8 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentPostedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentPostedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementPayoutIntentPostedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementPayoutIntentPostedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentProcessingEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentProcessingEvent.java new file mode 100644 index 000000000000..9a6fe31464cf --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentProcessingEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentProcessingEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentProcessingEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentProcessingEventNotification.java new file mode 100644 index 000000000000..cfad0cde9c68 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentProcessingEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentProcessingEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementPayoutIntentProcessingEvent fetchEvent() throws StripeException { + return (V2MoneyManagementPayoutIntentProcessingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentRequiresActionEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentRequiresActionEvent.java new file mode 100644 index 000000000000..3bed53ce8271 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentRequiresActionEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentRequiresActionEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentRequiresActionEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentRequiresActionEventNotification.java new file mode 100644 index 000000000000..986c0447b099 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentRequiresActionEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentRequiresActionEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementPayoutIntentRequiresActionEvent fetchEvent() throws StripeException { + return (V2MoneyManagementPayoutIntentRequiresActionEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentUpdatedEvent.java new file mode 100644 index 000000000000..b6166b1d15c6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentUpdatedEventNotification.java new file mode 100644 index 000000000000..c9f3697d2f6b --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutIntentUpdatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutIntentUpdatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutIntent fetchRelatedObject() throws StripeException { + return (PayoutIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementPayoutIntentUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementPayoutIntentUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodCreatedEvent.java new file mode 100644 index 000000000000..e525aa3a66a9 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodCreatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.PayoutMethod; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutMethodCreatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutMethod fetchRelatedObject() throws StripeException { + return (PayoutMethod) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodCreatedEventNotification.java new file mode 100644 index 000000000000..f87fcec8e09d --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.PayoutMethod; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutMethodCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutMethod fetchRelatedObject() throws StripeException { + return (PayoutMethod) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementPayoutMethodCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementPayoutMethodCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodUpdatedEvent.java new file mode 100644 index 000000000000..6347a0f2d828 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.PayoutMethod; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutMethodUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutMethod fetchRelatedObject() throws StripeException { + return (PayoutMethod) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodUpdatedEventNotification.java new file mode 100644 index 000000000000..b3c72de89f8e --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodUpdatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.PayoutMethod; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutMethodUpdatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutMethod fetchRelatedObject() throws StripeException { + return (PayoutMethod) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementPayoutMethodUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementPayoutMethodUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditAvailableEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditAvailableEvent.java new file mode 100644 index 000000000000..74753a9e7e98 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditAvailableEvent.java @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.ReceivedCredit; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2MoneyManagementReceivedCreditAvailableEvent extends Event { + /** Data for the v2.money_management.received_credit.available event. */ + @SerializedName("data") + V2MoneyManagementReceivedCreditAvailableEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The transaction ID of the received credit. */ + @SerializedName("transaction_id") + String transactionId; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedCredit fetchRelatedObject() throws StripeException { + return (ReceivedCredit) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditAvailableEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditAvailableEventNotification.java new file mode 100644 index 000000000000..907b56e9795a --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditAvailableEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedCredit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedCreditAvailableEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedCredit fetchRelatedObject() throws StripeException { + return (ReceivedCredit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedCreditAvailableEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedCreditAvailableEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditFailedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditFailedEvent.java new file mode 100644 index 000000000000..9a9986cbc689 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditFailedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.ReceivedCredit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedCreditFailedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedCredit fetchRelatedObject() throws StripeException { + return (ReceivedCredit) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditFailedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditFailedEventNotification.java new file mode 100644 index 000000000000..a6d1f08bea56 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditFailedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedCredit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedCreditFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedCredit fetchRelatedObject() throws StripeException { + return (ReceivedCredit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedCreditFailedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedCreditFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditReturnedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditReturnedEvent.java new file mode 100644 index 000000000000..20a797d08bb6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditReturnedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.ReceivedCredit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedCreditReturnedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedCredit fetchRelatedObject() throws StripeException { + return (ReceivedCredit) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditReturnedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditReturnedEventNotification.java new file mode 100644 index 000000000000..37d21bdb578d --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditReturnedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedCredit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedCreditReturnedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedCredit fetchRelatedObject() throws StripeException { + return (ReceivedCredit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedCreditReturnedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedCreditReturnedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditSucceededEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditSucceededEvent.java new file mode 100644 index 000000000000..9e4032a180a3 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditSucceededEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.ReceivedCredit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedCreditSucceededEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedCredit fetchRelatedObject() throws StripeException { + return (ReceivedCredit) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditSucceededEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditSucceededEventNotification.java new file mode 100644 index 000000000000..9c4989411589 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditSucceededEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedCredit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedCreditSucceededEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedCredit fetchRelatedObject() throws StripeException { + return (ReceivedCredit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedCreditSucceededEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedCreditSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEvent.java new file mode 100644 index 000000000000..af87759138e2 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.RecipientVerification; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementRecipientVerificationCreatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public RecipientVerification fetchRelatedObject() throws StripeException { + return (RecipientVerification) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEventNotification.java new file mode 100644 index 000000000000..f855bc2720d4 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.RecipientVerification; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementRecipientVerificationCreatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public RecipientVerification fetchRelatedObject() throws StripeException { + return (RecipientVerification) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementRecipientVerificationCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementRecipientVerificationCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEvent.java new file mode 100644 index 000000000000..dff2f13cc94a --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.RecipientVerification; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementRecipientVerificationUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public RecipientVerification fetchRelatedObject() throws StripeException { + return (RecipientVerification) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEventNotification.java new file mode 100644 index 000000000000..7f64f4e0aa5c --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.RecipientVerification; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementRecipientVerificationUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public RecipientVerification fetchRelatedObject() throws StripeException { + return (RecipientVerification) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementRecipientVerificationUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementRecipientVerificationUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEvent.java new file mode 100644 index 000000000000..8d41a7928228 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEvent.java @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.Transaction; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2MoneyManagementTransactionCreatedEvent extends Event { + /** Data for the v2.money_management.transaction.created event. */ + @SerializedName("data") + V2MoneyManagementTransactionCreatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** Id of the v1 Treasury Transaction corresponding to this Transaction. */ + @SerializedName("treasury_transaction") + String treasuryTransaction; + /** Id of the v1 Transaction corresponding to this Transaction. */ + @SerializedName("v1_id") + String v1Id; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Transaction fetchRelatedObject() throws StripeException { + return (Transaction) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEventNotification.java new file mode 100644 index 000000000000..f7bb6eaa1b8a --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.Transaction; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementTransactionCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Transaction fetchRelatedObject() throws StripeException { + return (Transaction) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementTransactionCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementTransactionCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementTransactionUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementTransactionUpdatedEvent.java new file mode 100644 index 000000000000..83852bab9bc9 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementTransactionUpdatedEvent.java @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.Transaction; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2MoneyManagementTransactionUpdatedEvent extends Event { + /** Data for the v2.money_management.transaction.updated event. */ + @SerializedName("data") + V2MoneyManagementTransactionUpdatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** Id of the v1 Treasury Transaction corresponding to this Transaction. */ + @SerializedName("treasury_transaction") + String treasuryTransaction; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Transaction fetchRelatedObject() throws StripeException { + return (Transaction) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementTransactionUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementTransactionUpdatedEventNotification.java new file mode 100644 index 000000000000..1524cb276d57 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementTransactionUpdatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.Transaction; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementTransactionUpdatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Transaction fetchRelatedObject() throws StripeException { + return (Transaction) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementTransactionUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementTransactionUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/exception/AlreadyCanceledException.java b/src/main/java/com/stripe/exception/AlreadyCanceledException.java new file mode 100644 index 000000000000..35fd91cd5bc1 --- /dev/null +++ b/src/main/java/com/stripe/exception/AlreadyCanceledException.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; + +/** Error returned when user tries to cancel an OutboundPayment that was already canceled. */ +public final class AlreadyCanceledException extends ApiException { + private static final long serialVersionUID = 2L; + + private AlreadyCanceledException( + String message, String requestId, String code, Integer statusCode, Throwable e) { + super(message, requestId, code, statusCode, e); + } + + static AlreadyCanceledException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + AlreadyCanceledException.AlreadyCanceledError error = + StripeObject.deserializeStripeObject( + body, AlreadyCanceledException.AlreadyCanceledError.class, responseGetter); + AlreadyCanceledException exception = + new AlreadyCanceledException( + error.getMessage(), requestId, error.getCode(), statusCode, null); + exception.setStripeError(error); + return exception; + } + + public static class AlreadyCanceledError extends StripeError {} +} diff --git a/src/main/java/com/stripe/exception/BlockedByStripeException.java b/src/main/java/com/stripe/exception/BlockedByStripeException.java new file mode 100644 index 000000000000..b0423718e6f8 --- /dev/null +++ b/src/main/java/com/stripe/exception/BlockedByStripeException.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; + +/** Returned in cases where the bank account cannot be used due to suspicious activity. */ +public final class BlockedByStripeException extends ApiException { + private static final long serialVersionUID = 2L; + + private BlockedByStripeException( + String message, String requestId, String code, Integer statusCode, Throwable e) { + super(message, requestId, code, statusCode, e); + } + + static BlockedByStripeException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + BlockedByStripeException.BlockedByStripeError error = + StripeObject.deserializeStripeObject( + body, BlockedByStripeException.BlockedByStripeError.class, responseGetter); + BlockedByStripeException exception = + new BlockedByStripeException( + error.getMessage(), requestId, error.getCode(), statusCode, null); + exception.setStripeError(error); + return exception; + } + + public static class BlockedByStripeError extends StripeError {} +} diff --git a/src/main/java/com/stripe/exception/CannotProceedException.java b/src/main/java/com/stripe/exception/CannotProceedException.java new file mode 100644 index 000000000000..e1307e9ecf91 --- /dev/null +++ b/src/main/java/com/stripe/exception/CannotProceedException.java @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.google.gson.annotations.SerializedName; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; +import lombok.Getter; + +/** + * Returned when the GB Bank Account object is set as default_for_currency and cannot be archived. + */ +public final class CannotProceedException extends ApiException { + private static final long serialVersionUID = 2L; + @Getter String reason; + + private CannotProceedException( + String message, + String requestId, + String code, + Integer statusCode, + Throwable e, + String reason) { + super(message, requestId, code, statusCode, e); + this.reason = reason; + } + + static CannotProceedException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + CannotProceedException.CannotProceedError error = + StripeObject.deserializeStripeObject( + body, CannotProceedException.CannotProceedError.class, responseGetter); + CannotProceedException exception = + new CannotProceedException( + error.getMessage(), requestId, error.getCode(), statusCode, null, error.getReason()); + exception.setStripeError(error); + return exception; + } + + public static class CannotProceedError extends StripeError { + @Getter + @SerializedName("reason") + String reason; + } +} diff --git a/src/main/java/com/stripe/exception/CapabilityNotEnabledException.java b/src/main/java/com/stripe/exception/CapabilityNotEnabledException.java new file mode 100644 index 000000000000..9ecc4fd05a74 --- /dev/null +++ b/src/main/java/com/stripe/exception/CapabilityNotEnabledException.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; + +/** The user attempts to create an outbound flow from a closed Financial Account. */ +public final class CapabilityNotEnabledException extends ApiException { + private static final long serialVersionUID = 2L; + + private CapabilityNotEnabledException( + String message, String requestId, String code, Integer statusCode, Throwable e) { + super(message, requestId, code, statusCode, e); + } + + static CapabilityNotEnabledException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + CapabilityNotEnabledException.CapabilityNotEnabledError error = + StripeObject.deserializeStripeObject( + body, CapabilityNotEnabledException.CapabilityNotEnabledError.class, responseGetter); + CapabilityNotEnabledException exception = + new CapabilityNotEnabledException( + error.getMessage(), requestId, error.getCode(), statusCode, null); + exception.setStripeError(error); + return exception; + } + + public static class CapabilityNotEnabledError extends StripeError {} +} diff --git a/src/main/java/com/stripe/exception/ControlledByAlternateResourceException.java b/src/main/java/com/stripe/exception/ControlledByAlternateResourceException.java new file mode 100644 index 000000000000..5c0152a8bb7e --- /dev/null +++ b/src/main/java/com/stripe/exception/ControlledByAlternateResourceException.java @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; + +/** + * Returned when the GB Bank Account is controlled by an alternate resource and cannot be archived. + */ +public final class ControlledByAlternateResourceException extends ApiException { + private static final long serialVersionUID = 2L; + + private ControlledByAlternateResourceException( + String message, String requestId, String code, Integer statusCode, Throwable e) { + super(message, requestId, code, statusCode, e); + } + + static ControlledByAlternateResourceException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + ControlledByAlternateResourceException.ControlledByAlternateResourceError error = + StripeObject.deserializeStripeObject( + body, + ControlledByAlternateResourceException.ControlledByAlternateResourceError.class, + responseGetter); + ControlledByAlternateResourceException exception = + new ControlledByAlternateResourceException( + error.getMessage(), requestId, error.getCode(), statusCode, null); + exception.setStripeError(error); + return exception; + } + + public static class ControlledByAlternateResourceError extends StripeError {} +} diff --git a/src/main/java/com/stripe/exception/FeatureNotEnabledException.java b/src/main/java/com/stripe/exception/FeatureNotEnabledException.java new file mode 100644 index 000000000000..92cbb8cbaaef --- /dev/null +++ b/src/main/java/com/stripe/exception/FeatureNotEnabledException.java @@ -0,0 +1,34 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; + +/** + * Error returned when recipient does not have the active features required to receive funds from + * this OutboundPayment request. + */ +public final class FeatureNotEnabledException extends ApiException { + private static final long serialVersionUID = 2L; + + private FeatureNotEnabledException( + String message, String requestId, String code, Integer statusCode, Throwable e) { + super(message, requestId, code, statusCode, e); + } + + static FeatureNotEnabledException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + FeatureNotEnabledException.FeatureNotEnabledError error = + StripeObject.deserializeStripeObject( + body, FeatureNotEnabledException.FeatureNotEnabledError.class, responseGetter); + FeatureNotEnabledException exception = + new FeatureNotEnabledException( + error.getMessage(), requestId, error.getCode(), statusCode, null); + exception.setStripeError(error); + return exception; + } + + public static class FeatureNotEnabledError extends StripeError {} +} diff --git a/src/main/java/com/stripe/exception/FinancialAccountNotOpenException.java b/src/main/java/com/stripe/exception/FinancialAccountNotOpenException.java new file mode 100644 index 000000000000..a4feb6528321 --- /dev/null +++ b/src/main/java/com/stripe/exception/FinancialAccountNotOpenException.java @@ -0,0 +1,32 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; + +public final class FinancialAccountNotOpenException extends ApiException { + private static final long serialVersionUID = 2L; + + private FinancialAccountNotOpenException( + String message, String requestId, String code, Integer statusCode, Throwable e) { + super(message, requestId, code, statusCode, e); + } + + static FinancialAccountNotOpenException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + FinancialAccountNotOpenException.FinancialAccountNotOpenError error = + StripeObject.deserializeStripeObject( + body, + FinancialAccountNotOpenException.FinancialAccountNotOpenError.class, + responseGetter); + FinancialAccountNotOpenException exception = + new FinancialAccountNotOpenException( + error.getMessage(), requestId, error.getCode(), statusCode, null); + exception.setStripeError(error); + return exception; + } + + public static class FinancialAccountNotOpenError extends StripeError {} +} diff --git a/src/main/java/com/stripe/exception/FxQuoteNeedsRefreshException.java b/src/main/java/com/stripe/exception/FxQuoteNeedsRefreshException.java new file mode 100644 index 000000000000..48874924cb1e --- /dev/null +++ b/src/main/java/com/stripe/exception/FxQuoteNeedsRefreshException.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; + +/** Error returned when the FX quote rate lock for a PayoutIntent has expired. */ +public final class FxQuoteNeedsRefreshException extends ApiException { + private static final long serialVersionUID = 2L; + + private FxQuoteNeedsRefreshException( + String message, String requestId, String code, Integer statusCode, Throwable e) { + super(message, requestId, code, statusCode, e); + } + + static FxQuoteNeedsRefreshException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + FxQuoteNeedsRefreshException.FxQuoteNeedsRefreshError error = + StripeObject.deserializeStripeObject( + body, FxQuoteNeedsRefreshException.FxQuoteNeedsRefreshError.class, responseGetter); + FxQuoteNeedsRefreshException exception = + new FxQuoteNeedsRefreshException( + error.getMessage(), requestId, error.getCode(), statusCode, null); + exception.setStripeError(error); + return exception; + } + + public static class FxQuoteNeedsRefreshError extends StripeError {} +} diff --git a/src/main/java/com/stripe/exception/InsufficientFundsException.java b/src/main/java/com/stripe/exception/InsufficientFundsException.java new file mode 100644 index 000000000000..a640ffd962f5 --- /dev/null +++ b/src/main/java/com/stripe/exception/InsufficientFundsException.java @@ -0,0 +1,34 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; + +/** + * Error returned when the balance of provided financial account and balance type in the + * OutboundPayment/OutboundTransfer request does not have enough funds. + */ +public final class InsufficientFundsException extends ApiException { + private static final long serialVersionUID = 2L; + + private InsufficientFundsException( + String message, String requestId, String code, Integer statusCode, Throwable e) { + super(message, requestId, code, statusCode, e); + } + + static InsufficientFundsException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + InsufficientFundsException.InsufficientFundsError error = + StripeObject.deserializeStripeObject( + body, InsufficientFundsException.InsufficientFundsError.class, responseGetter); + InsufficientFundsException exception = + new InsufficientFundsException( + error.getMessage(), requestId, error.getCode(), statusCode, null); + exception.setStripeError(error); + return exception; + } + + public static class InsufficientFundsError extends StripeError {} +} diff --git a/src/main/java/com/stripe/exception/InvalidPaymentMethodException.java b/src/main/java/com/stripe/exception/InvalidPaymentMethodException.java new file mode 100644 index 000000000000..49cfb87a9989 --- /dev/null +++ b/src/main/java/com/stripe/exception/InvalidPaymentMethodException.java @@ -0,0 +1,52 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.google.gson.annotations.SerializedName; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; +import lombok.Getter; + +/** + * Returned in cases where the bank account provided is not valid (wrong format of account number or + * a routing number that does not correspond to a banking institution). + */ +public final class InvalidPaymentMethodException extends ApiException { + private static final long serialVersionUID = 2L; + @Getter String invalidParam; + + private InvalidPaymentMethodException( + String message, + String requestId, + String code, + Integer statusCode, + Throwable e, + String invalidParam) { + super(message, requestId, code, statusCode, e); + this.invalidParam = invalidParam; + } + + static InvalidPaymentMethodException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + InvalidPaymentMethodException.InvalidPaymentMethodError error = + StripeObject.deserializeStripeObject( + body, InvalidPaymentMethodException.InvalidPaymentMethodError.class, responseGetter); + InvalidPaymentMethodException exception = + new InvalidPaymentMethodException( + error.getMessage(), + requestId, + error.getCode(), + statusCode, + null, + error.getInvalidParam()); + exception.setStripeError(error); + return exception; + } + + public static class InvalidPaymentMethodError extends StripeError { + @Getter + @SerializedName("invalid_param") + String invalidParam; + } +} diff --git a/src/main/java/com/stripe/exception/InvalidPayoutMethodException.java b/src/main/java/com/stripe/exception/InvalidPayoutMethodException.java new file mode 100644 index 000000000000..d25634cc6720 --- /dev/null +++ b/src/main/java/com/stripe/exception/InvalidPayoutMethodException.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; + +/** Returned in cases where the ID provided doesn't correspond to a valid payout method. */ +public final class InvalidPayoutMethodException extends ApiException { + private static final long serialVersionUID = 2L; + + private InvalidPayoutMethodException( + String message, String requestId, String code, Integer statusCode, Throwable e) { + super(message, requestId, code, statusCode, e); + } + + static InvalidPayoutMethodException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + InvalidPayoutMethodException.InvalidPayoutMethodError error = + StripeObject.deserializeStripeObject( + body, InvalidPayoutMethodException.InvalidPayoutMethodError.class, responseGetter); + InvalidPayoutMethodException exception = + new InvalidPayoutMethodException( + error.getMessage(), requestId, error.getCode(), statusCode, null); + exception.setStripeError(error); + return exception; + } + + public static class InvalidPayoutMethodError extends StripeError {} +} diff --git a/src/main/java/com/stripe/exception/InvalidVaultedCredentialException.java b/src/main/java/com/stripe/exception/InvalidVaultedCredentialException.java new file mode 100644 index 000000000000..5af40a2300f9 --- /dev/null +++ b/src/main/java/com/stripe/exception/InvalidVaultedCredentialException.java @@ -0,0 +1,64 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.google.gson.annotations.SerializedName; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; +import lombok.Getter; + +/** + * Returned in cases where the bank account provided is not valid (wrong format of account number or + * a routing number that does not correspond to a banking institution). + */ +public final class InvalidVaultedCredentialException extends ApiException { + private static final long serialVersionUID = 2L; + /** + * Closed Enum. The field that already exists on the resource. + * + *

One of {@code account_number}, {@code currency}, {@code iban}, or {@code sort_code}. + */ + @Getter String invalidParam; + + private InvalidVaultedCredentialException( + String message, + String requestId, + String code, + Integer statusCode, + Throwable e, + String invalidParam) { + super(message, requestId, code, statusCode, e); + this.invalidParam = invalidParam; + } + + static InvalidVaultedCredentialException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + InvalidVaultedCredentialException.InvalidVaultedCredentialError error = + StripeObject.deserializeStripeObject( + body, + InvalidVaultedCredentialException.InvalidVaultedCredentialError.class, + responseGetter); + InvalidVaultedCredentialException exception = + new InvalidVaultedCredentialException( + error.getMessage(), + requestId, + error.getCode(), + statusCode, + null, + error.getInvalidParam()); + exception.setStripeError(error); + return exception; + } + + public static class InvalidVaultedCredentialError extends StripeError { + /** + * Closed Enum. The field that already exists on the resource. + * + *

One of {@code account_number}, {@code currency}, {@code iban}, or {@code sort_code}. + */ + @Getter + @SerializedName("invalid_param") + String invalidParam; + } +} diff --git a/src/main/java/com/stripe/exception/NotCancelableException.java b/src/main/java/com/stripe/exception/NotCancelableException.java new file mode 100644 index 000000000000..79e5e6027f12 --- /dev/null +++ b/src/main/java/com/stripe/exception/NotCancelableException.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; + +/** Error returned when user tries to cancel an OutboundPayment that is not cancelable. */ +public final class NotCancelableException extends ApiException { + private static final long serialVersionUID = 2L; + + private NotCancelableException( + String message, String requestId, String code, Integer statusCode, Throwable e) { + super(message, requestId, code, statusCode, e); + } + + static NotCancelableException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + NotCancelableException.NotCancelableError error = + StripeObject.deserializeStripeObject( + body, NotCancelableException.NotCancelableError.class, responseGetter); + NotCancelableException exception = + new NotCancelableException( + error.getMessage(), requestId, error.getCode(), statusCode, null); + exception.setStripeError(error); + return exception; + } + + public static class NotCancelableError extends StripeError {} +} diff --git a/src/main/java/com/stripe/exception/QuotaExceededException.java b/src/main/java/com/stripe/exception/QuotaExceededException.java new file mode 100644 index 000000000000..7b059aa0b640 --- /dev/null +++ b/src/main/java/com/stripe/exception/QuotaExceededException.java @@ -0,0 +1,36 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; + +/** + * Returned when the number of GBBankAccount objects on a given V2 Account has exceeded the limit of + * 10. GBBankAccount objects may be archived with /archive, at which point they will not count + * against the limit. If you are not passing a V2 Account ID in the Stripe-Context header you may + * receive this error since you are creating all your GBBankAccount objects in your own workspace. + */ +public final class QuotaExceededException extends ApiException { + private static final long serialVersionUID = 2L; + + private QuotaExceededException( + String message, String requestId, String code, Integer statusCode, Throwable e) { + super(message, requestId, code, statusCode, e); + } + + static QuotaExceededException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + QuotaExceededException.QuotaExceededError error = + StripeObject.deserializeStripeObject( + body, QuotaExceededException.QuotaExceededError.class, responseGetter); + QuotaExceededException exception = + new QuotaExceededException( + error.getMessage(), requestId, error.getCode(), statusCode, null); + exception.setStripeError(error); + return exception; + } + + public static class QuotaExceededError extends StripeError {} +} diff --git a/src/main/java/com/stripe/exception/RecipientNotNotifiableException.java b/src/main/java/com/stripe/exception/RecipientNotNotifiableException.java new file mode 100644 index 000000000000..5432d5caf95e --- /dev/null +++ b/src/main/java/com/stripe/exception/RecipientNotNotifiableException.java @@ -0,0 +1,36 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; + +/** + * Error returned when the user enables notifications in the OutboundPayment request, but an email + * is not set up on the recipient account. + */ +public final class RecipientNotNotifiableException extends ApiException { + private static final long serialVersionUID = 2L; + + private RecipientNotNotifiableException( + String message, String requestId, String code, Integer statusCode, Throwable e) { + super(message, requestId, code, statusCode, e); + } + + static RecipientNotNotifiableException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + RecipientNotNotifiableException.RecipientNotNotifiableError error = + StripeObject.deserializeStripeObject( + body, + RecipientNotNotifiableException.RecipientNotNotifiableError.class, + responseGetter); + RecipientNotNotifiableException exception = + new RecipientNotNotifiableException( + error.getMessage(), requestId, error.getCode(), statusCode, null); + exception.setStripeError(error); + return exception; + } + + public static class RecipientNotNotifiableError extends StripeError {} +} diff --git a/src/main/java/com/stripe/exception/StripeException.java b/src/main/java/com/stripe/exception/StripeException.java index 929ed5edbe69..acb7cd60eb12 100644 --- a/src/main/java/com/stripe/exception/StripeException.java +++ b/src/main/java/com/stripe/exception/StripeException.java @@ -113,12 +113,66 @@ public static StripeException parseV2Exception( StripeResponseGetter responseGetter) { switch (type) { // The beginning of the section generated from our OpenAPI spec + case "already_canceled": + return com.stripe.exception.AlreadyCanceledException.parse( + body, statusCode, requestId, responseGetter); + case "blocked_by_stripe": + return com.stripe.exception.BlockedByStripeException.parse( + body, statusCode, requestId, responseGetter); + case "cannot_proceed": + return com.stripe.exception.CannotProceedException.parse( + body, statusCode, requestId, responseGetter); + case "capability_not_enabled": + return com.stripe.exception.CapabilityNotEnabledException.parse( + body, statusCode, requestId, responseGetter); + case "controlled_by_alternate_resource": + return com.stripe.exception.ControlledByAlternateResourceException.parse( + body, statusCode, requestId, responseGetter); + case "feature_not_enabled": + return com.stripe.exception.FeatureNotEnabledException.parse( + body, statusCode, requestId, responseGetter); + case "financial_account_not_open": + return com.stripe.exception.FinancialAccountNotOpenException.parse( + body, statusCode, requestId, responseGetter); + case "fx_quote_needs_refresh": + return com.stripe.exception.FxQuoteNeedsRefreshException.parse( + body, statusCode, requestId, responseGetter); + case "insufficient_funds": + return com.stripe.exception.InsufficientFundsException.parse( + body, statusCode, requestId, responseGetter); + case "invalid_payment_method": + return com.stripe.exception.InvalidPaymentMethodException.parse( + body, statusCode, requestId, responseGetter); + case "invalid_payout_method": + return com.stripe.exception.InvalidPayoutMethodException.parse( + body, statusCode, requestId, responseGetter); + case "invalid_vaulted_credential": + return com.stripe.exception.InvalidVaultedCredentialException.parse( + body, statusCode, requestId, responseGetter); + case "not_cancelable": + return com.stripe.exception.NotCancelableException.parse( + body, statusCode, requestId, responseGetter); + case "quota_exceeded": + return com.stripe.exception.QuotaExceededException.parse( + body, statusCode, requestId, responseGetter); case "rate_limit": return com.stripe.exception.RateLimitException.parse( body, statusCode, requestId, responseGetter); + case "recipient_not_notifiable": + return com.stripe.exception.RecipientNotNotifiableException.parse( + body, statusCode, requestId, responseGetter); case "temporary_session_expired": return com.stripe.exception.TemporarySessionExpiredException.parse( body, statusCode, requestId, responseGetter); + case "verification_attempt_failed": + return com.stripe.exception.VerificationAttemptFailedException.parse( + body, statusCode, requestId, responseGetter); + case "verification_expired": + return com.stripe.exception.VerificationExpiredException.parse( + body, statusCode, requestId, responseGetter); + case "verification_not_initiated": + return com.stripe.exception.VerificationNotInitiatedException.parse( + body, statusCode, requestId, responseGetter); // The end of the section generated from our OpenAPI spec } return null; diff --git a/src/main/java/com/stripe/exception/VerificationAttemptFailedException.java b/src/main/java/com/stripe/exception/VerificationAttemptFailedException.java new file mode 100644 index 000000000000..4dac8ac1fdba --- /dev/null +++ b/src/main/java/com/stripe/exception/VerificationAttemptFailedException.java @@ -0,0 +1,63 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.google.gson.annotations.SerializedName; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; +import lombok.Getter; + +/** Returned when the wrong values were provided to confirm microdeposits. */ +public final class VerificationAttemptFailedException extends ApiException { + private static final long serialVersionUID = 2L; + /** + * Closed Enum. The verification status of the bank account associated with this error. + * + *

One of {@code awaiting_verification}, {@code unverified}, {@code verification_failed}, or + * {@code verified}. + */ + @Getter String verificationStatus; + + private VerificationAttemptFailedException( + String message, + String requestId, + String code, + Integer statusCode, + Throwable e, + String verificationStatus) { + super(message, requestId, code, statusCode, e); + this.verificationStatus = verificationStatus; + } + + static VerificationAttemptFailedException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + VerificationAttemptFailedException.VerificationAttemptFailedError error = + StripeObject.deserializeStripeObject( + body, + VerificationAttemptFailedException.VerificationAttemptFailedError.class, + responseGetter); + VerificationAttemptFailedException exception = + new VerificationAttemptFailedException( + error.getMessage(), + requestId, + error.getCode(), + statusCode, + null, + error.getVerificationStatus()); + exception.setStripeError(error); + return exception; + } + + public static class VerificationAttemptFailedError extends StripeError { + /** + * Closed Enum. The verification status of the bank account associated with this error. + * + *

One of {@code awaiting_verification}, {@code unverified}, {@code verification_failed}, or + * {@code verified}. + */ + @Getter + @SerializedName("verification_status") + String verificationStatus; + } +} diff --git a/src/main/java/com/stripe/exception/VerificationExpiredException.java b/src/main/java/com/stripe/exception/VerificationExpiredException.java new file mode 100644 index 000000000000..78cf471e5dd8 --- /dev/null +++ b/src/main/java/com/stripe/exception/VerificationExpiredException.java @@ -0,0 +1,64 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.google.gson.annotations.SerializedName; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; +import lombok.Getter; + +/** + * Returned when an attempt to confirm microdeposits has failed because too much time has elapsed + * since the microdeposits were sent. + */ +public final class VerificationExpiredException extends ApiException { + private static final long serialVersionUID = 2L; + /** + * Closed Enum. The verification status of the bank account associated with this error. + * + *

One of {@code awaiting_verification}, {@code unverified}, {@code verification_failed}, or + * {@code verified}. + */ + @Getter String verificationStatus; + + private VerificationExpiredException( + String message, + String requestId, + String code, + Integer statusCode, + Throwable e, + String verificationStatus) { + super(message, requestId, code, statusCode, e); + this.verificationStatus = verificationStatus; + } + + static VerificationExpiredException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + VerificationExpiredException.VerificationExpiredError error = + StripeObject.deserializeStripeObject( + body, VerificationExpiredException.VerificationExpiredError.class, responseGetter); + VerificationExpiredException exception = + new VerificationExpiredException( + error.getMessage(), + requestId, + error.getCode(), + statusCode, + null, + error.getVerificationStatus()); + exception.setStripeError(error); + return exception; + } + + public static class VerificationExpiredError extends StripeError { + /** + * Closed Enum. The verification status of the bank account associated with this error. + * + *

One of {@code awaiting_verification}, {@code unverified}, {@code verification_failed}, or + * {@code verified}. + */ + @Getter + @SerializedName("verification_status") + String verificationStatus; + } +} diff --git a/src/main/java/com/stripe/exception/VerificationNotInitiatedException.java b/src/main/java/com/stripe/exception/VerificationNotInitiatedException.java new file mode 100644 index 000000000000..5a1ead7f6d3b --- /dev/null +++ b/src/main/java/com/stripe/exception/VerificationNotInitiatedException.java @@ -0,0 +1,66 @@ +// File generated from our OpenAPI spec +package com.stripe.exception; + +import com.google.gson.JsonObject; +import com.google.gson.annotations.SerializedName; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; +import lombok.Getter; + +/** + * Returned when an attempt is made to confirm microdeposits before the microdeposits have been + * sent. + */ +public final class VerificationNotInitiatedException extends ApiException { + private static final long serialVersionUID = 2L; + /** + * Closed Enum. The verification status of the bank account associated with this error. + * + *

One of {@code awaiting_verification}, {@code unverified}, {@code verification_failed}, or + * {@code verified}. + */ + @Getter String verificationStatus; + + private VerificationNotInitiatedException( + String message, + String requestId, + String code, + Integer statusCode, + Throwable e, + String verificationStatus) { + super(message, requestId, code, statusCode, e); + this.verificationStatus = verificationStatus; + } + + static VerificationNotInitiatedException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + VerificationNotInitiatedException.VerificationNotInitiatedError error = + StripeObject.deserializeStripeObject( + body, + VerificationNotInitiatedException.VerificationNotInitiatedError.class, + responseGetter); + VerificationNotInitiatedException exception = + new VerificationNotInitiatedException( + error.getMessage(), + requestId, + error.getCode(), + statusCode, + null, + error.getVerificationStatus()); + exception.setStripeError(error); + return exception; + } + + public static class VerificationNotInitiatedError extends StripeError { + /** + * Closed Enum. The verification status of the bank account associated with this error. + * + *

One of {@code awaiting_verification}, {@code unverified}, {@code verification_failed}, or + * {@code verified}. + */ + @Getter + @SerializedName("verification_status") + String verificationStatus; + } +} diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index 8f9a3e757769..9311344e4d4a 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -1575,6 +1575,15 @@ public static class Capabilities extends StripeObject { @SerializedName("us_bank_transfer_payments") String usBankTransferPayments; + /** + * The status of the Wero capability of the account, or whether the account can directly process + * Wero payments. + * + *

One of {@code active}, {@code inactive}, or {@code pending}. + */ + @SerializedName("wero_payments") + String weroPayments; + /** * The status of the Zip capability of the account, or whether the account can directly process * Zip charges. @@ -1707,6 +1716,9 @@ public static class Company extends StripeObject { @SerializedName("phone") String phone; + @SerializedName("physical_address") + Address physicalAddress; + @SerializedName("principal_place_of_business") Address principalPlaceOfBusiness; diff --git a/src/main/java/com/stripe/model/AccountSession.java b/src/main/java/com/stripe/model/AccountSession.java index e526846831b6..798ccb69e1b2 100644 --- a/src/main/java/com/stripe/model/AccountSession.java +++ b/src/main/java/com/stripe/model/AccountSession.java @@ -186,12 +186,21 @@ public static class Components extends StripeObject { @SerializedName("payouts_list") PayoutsList payoutsList; + @SerializedName("reporting_chart") + ReportingChart reportingChart; + @SerializedName("tax_registrations") TaxRegistrations taxRegistrations; @SerializedName("tax_settings") TaxSettings taxSettings; + @SerializedName("terminal_hardware_orders") + TerminalHardwareOrders terminalHardwareOrders; + + @SerializedName("terminal_hardware_shop") + TerminalHardwareShop terminalHardwareShop; + /** * For more details about AccountManagement, please refer to the API Reference. @@ -1064,6 +1073,31 @@ public static class PayoutsList extends StripeObject { public static class Features extends StripeObject {} } + /** + * For more details about ReportingChart, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ReportingChart extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + /** + * For more details about Features, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject {} + } + /** * For more details about TaxRegistrations, please refer to the API Reference. @@ -1113,6 +1147,56 @@ public static class TaxSettings extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Features extends StripeObject {} } + + /** + * For more details about TerminalHardwareOrders, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TerminalHardwareOrders extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + /** + * For more details about Features, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject {} + } + + /** + * For more details about TerminalHardwareShop, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TerminalHardwareShop extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + /** + * For more details about Features, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject {} + } } @Override diff --git a/src/main/java/com/stripe/model/ApplicationFee.java b/src/main/java/com/stripe/model/ApplicationFee.java index 0f4996b61722..b4f5a56fc61f 100644 --- a/src/main/java/com/stripe/model/ApplicationFee.java +++ b/src/main/java/com/stripe/model/ApplicationFee.java @@ -16,6 +16,15 @@ import lombok.Getter; import lombok.Setter; +/** + * When you collect a transaction fee on top of a charge made for your user (using Connect), an {@code Application Fee} object is created + * in your account. You can list, retrieve, and refund application fees. + * + *

Related guide: Collecting application + * fees + */ @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/Card.java b/src/main/java/com/stripe/model/Card.java index dbc1cec65541..4892ea51feea 100644 --- a/src/main/java/com/stripe/model/Card.java +++ b/src/main/java/com/stripe/model/Card.java @@ -9,6 +9,7 @@ import com.stripe.net.ApiResource; import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; import com.stripe.param.CardUpdateOnAccountParams; import com.stripe.param.CardUpdateOnCustomerParams; import java.util.List; @@ -21,6 +22,9 @@ * You can store multiple cards on a customer in order to charge the customer later. You can also * store multiple debit cards on a recipient in order to transfer to those cards later. * + *

This API is deprecated. Use the PaymentMethods API instead. + * *

Related guide: Card payments with Sources */ @Getter @@ -28,6 +32,13 @@ @EqualsAndHashCode(callSuper = false) public class Card extends ApiResource implements MetadataStore, ExternalAccount, PaymentSource { + /** + * The account this card belongs to. Only applicable on Accounts (not customers or recipients) + * This property is only available when returned as an External Account where controller.is_controller + * is {@code true}. + */ @SerializedName("account") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) @@ -520,4 +531,12 @@ public static class Networks extends StripeObject { @SerializedName("preferred") String preferred; } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(account, responseGetter); + trySetResponseGetter(customer, responseGetter); + trySetResponseGetter(networks, responseGetter); + } } diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index d7e13631e362..b633d1c6164b 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -1980,6 +1980,23 @@ public static class Card extends StripeObject { @SerializedName("regulated_status") String regulatedStatus; + /** + * The payment_method_options.card.setup_credential_usage value that was passed when + * setup_future_usage was present at confirmation, one of {@code recurring}, {@code + * unscheduled}, or {@code installment}. + */ + @SerializedName("setup_credential_usage") + String setupCredentialUsage; + + /** + * The payment_method_options.card.stored_credential_usage value that was passed for an off + * session, merchant-initiated transaction. + * + *

One of {@code installment}, {@code recurring}, or {@code unscheduled}. + */ + @SerializedName("stored_credential_usage") + String storedCredentialUsage; + /** Populated if this transaction used 3D Secure authentication. */ @SerializedName("three_d_secure") ThreeDSecure threeDSecure; @@ -2770,8 +2787,8 @@ public static class Crypto extends StripeObject { /** * The token currency that the transaction was sent with. * - *

One of {@code phantom_cash}, {@code usdc}, {@code usdg}, {@code usdp}, {@code usdsui}, - * or {@code usdt}. + *

One of {@code ousd}, {@code phantom_cash}, {@code usdc}, {@code usdg}, {@code usdp}, + * {@code usdsui}, or {@code usdt}. */ @SerializedName("token_currency") String tokenCurrency; diff --git a/src/main/java/com/stripe/model/Customer.java b/src/main/java/com/stripe/model/Customer.java index eeb7b5b7e79a..1bd7013cf871 100644 --- a/src/main/java/com/stripe/model/Customer.java +++ b/src/main/java/com/stripe/model/Customer.java @@ -1033,13 +1033,13 @@ private TestHelpers(Customer resource) { this.resource = resource; } - /** Create an incoming testmode bank transfer. */ + /** Create a test incoming bank transfer. */ public CustomerCashBalanceTransaction fundCashBalance(Map params) throws StripeException { return fundCashBalance(params, (RequestOptions) null); } - /** Create an incoming testmode bank transfer. */ + /** Create a test incoming bank transfer. */ public CustomerCashBalanceTransaction fundCashBalance( Map params, RequestOptions options) throws StripeException { String path = @@ -1051,13 +1051,13 @@ public CustomerCashBalanceTransaction fundCashBalance( return resource.getResponseGetter().request(request, CustomerCashBalanceTransaction.class); } - /** Create an incoming testmode bank transfer. */ + /** Create a test incoming bank transfer. */ public CustomerCashBalanceTransaction fundCashBalance(CustomerFundCashBalanceParams params) throws StripeException { return fundCashBalance(params, (RequestOptions) null); } - /** Create an incoming testmode bank transfer. */ + /** Create a test incoming bank transfer. */ public CustomerCashBalanceTransaction fundCashBalance( CustomerFundCashBalanceParams params, RequestOptions options) throws StripeException { String path = diff --git a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java index a5dae90649fb..acf4a94d5900 100644 --- a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java +++ b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java @@ -350,7 +350,8 @@ public static class UsBankTransfer extends StripeObject { /** * The banking network used for this funding. * - *

One of {@code ach}, {@code domestic_wire_us}, or {@code swift}. + *

One of {@code ach}, {@code domestic_wire_us}, {@code fednow}, {@code rtp}, or {@code + * swift}. */ @SerializedName("network") String network; diff --git a/src/main/java/com/stripe/model/Dispute.java b/src/main/java/com/stripe/model/Dispute.java index be7e0529aaf3..7022480c6bcc 100644 --- a/src/main/java/com/stripe/model/Dispute.java +++ b/src/main/java/com/stripe/model/Dispute.java @@ -77,6 +77,15 @@ public class Dispute extends ApiResource @SerializedName("id") String id; + /** + * Intended submission method for the dispute. + * + *

One of {@code manual}, {@code prefer_manual}, {@code prefer_smart_disputes}, or {@code + * smart_disputes}. + */ + @SerializedName("intended_submission_method") + String intendedSubmissionMethod; + /** * If true, it's still possible to refund the disputed payment. After the payment has been fully * refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. @@ -136,10 +145,12 @@ public class Dispute extends ApiResource /** * The current status of a dispute. Possible values include:{@code warning_needs_response}, {@code * warning_under_review}, {@code warning_closed}, {@code needs_response}, {@code under_review}, - * {@code won}, {@code lost}, or {@code prevented}. + * {@code appeal_needs_response}, {@code appeal_under_review}, {@code won}, {@code lost}, or + * {@code prevented}. * - *

One of {@code lost}, {@code needs_response}, {@code prevented}, {@code under_review}, {@code - * warning_closed}, {@code warning_needs_response}, {@code warning_under_review}, or {@code won}. + *

One of {@code appeal_needs_response}, {@code appeal_under_review}, {@code lost}, {@code + * needs_response}, {@code prevented}, {@code under_review}, {@code warning_closed}, {@code + * warning_needs_response}, {@code warning_under_review}, or {@code won}. */ @SerializedName("status") String status; @@ -413,6 +424,10 @@ public static class Evidence extends StripeObject { @SerializedName("access_activity_log") String accessActivityLog; + /** Appeal evidence submitted during the appeal stage. */ + @SerializedName("appeal") + Appeal appeal; + /** The billing address provided by the customer. */ @SerializedName("billing_address") String billingAddress; @@ -770,6 +785,39 @@ public void setUncategorizedFileObject(File expandableObject) { new ExpandableField(expandableObject.getId(), expandableObject); } + /** + * For more details about Appeal, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Appeal extends StripeObject { + @SerializedName("card") + Card card; + + /** + * For more details about Card, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** The reason for filing the appeal. */ + @SerializedName("reason_for_filing") + String reasonForFiling; + + /** + * One or more document IDs returned by a file upload with a {@code purpose} + * value of {@code dispute_evidence} to support the appeal. + */ + @SerializedName("supporting_files") + List supportingFiles; + } + } + /** * For more details about EnhancedEvidence, please refer to the API Reference. @@ -1069,6 +1117,14 @@ public static class EvidenceDetails extends StripeObject { @SerializedName("submission_count") Long submissionCount; + /** + * Whether the dispute was submitted manually, with Smart Disputes, or not submitted. + * + *

One of {@code manual}, {@code not_submitted}, or {@code smart_disputes}. + */ + @SerializedName("submission_method") + String submissionMethod; + /** * For more details about EnhancedEligibility, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index 195ed25d942c..0666e416a1e3 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -202,10 +202,15 @@ public class Event extends ApiResource implements HasId { * terminal.reader.action_updated}, {@code test_helpers.test_clock.advancing}, {@code * test_helpers.test_clock.created}, {@code test_helpers.test_clock.deleted}, {@code * test_helpers.test_clock.internal_failure}, {@code test_helpers.test_clock.ready}, {@code - * topup.canceled}, {@code topup.created}, {@code topup.failed}, {@code topup.reversed}, {@code - * topup.succeeded}, {@code transfer.created}, {@code transfer.reversed}, {@code - * transfer.updated}, {@code treasury.credit_reversal.created}, {@code - * treasury.credit_reversal.posted}, {@code treasury.debit_reversal.completed}, {@code + * three_d_secure.authentication.canceled}, {@code + * three_d_secure.authentication.challenge_started}, {@code + * three_d_secure.authentication.errored}, {@code three_d_secure.authentication.failed}, {@code + * three_d_secure.authentication.requires_challenge}, {@code + * three_d_secure.authentication.requires_submission}, {@code + * three_d_secure.authentication.succeeded}, {@code topup.canceled}, {@code topup.created}, {@code + * topup.failed}, {@code topup.reversed}, {@code topup.succeeded}, {@code transfer.created}, + * {@code transfer.reversed}, {@code transfer.updated}, {@code treasury.credit_reversal.created}, + * {@code treasury.credit_reversal.posted}, {@code treasury.debit_reversal.completed}, {@code * treasury.debit_reversal.created}, {@code treasury.debit_reversal.initial_credit_granted}, * {@code treasury.financial_account.closed}, {@code treasury.financial_account.created}, {@code * treasury.financial_account.features_status_updated}, {@code diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index f7e1563bbc07..c8a12cefbd5e 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -2131,8 +2131,11 @@ public static class CustomerTaxId extends StripeObject { * {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, {@code * mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code tj_tin}, * {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code az_tin}, {@code - * bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, {@code cm_niu}, - * {@code cv_nif}, {@code bf_ifu}, {@code ic_nif}, or {@code unknown}. + * bd_bin}, {@code au_acn}, {@code nz_bn}, {@code pt_nif}, {@code cz_dic}, {@code fr_siret}, + * {@code fr_siren}, {@code fr_spi}, {@code sm_coe}, {@code tt_vat}, {@code tt_bir}, {@code + * mu_vat}, {@code mz_nuit}, {@code au_wpn}, {@code md_cf}, {@code is_kt}, {@code bj_ifu}, + * {@code et_tin}, {@code kg_tin}, {@code la_tin}, {@code cm_niu}, {@code cv_nif}, {@code + * bf_ifu}, {@code ic_nif}, {@code gh_tin}, {@code bw_vat}, {@code ci_vat}, or {@code unknown}. */ @SerializedName("type") String type; @@ -2749,8 +2752,8 @@ public static class Pix extends StripeObject { String amountIncludesIof; /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). */ @SerializedName("expires_after_seconds") Long expiresAfterSeconds; diff --git a/src/main/java/com/stripe/model/InvoiceItem.java b/src/main/java/com/stripe/model/InvoiceItem.java index ea832c499859..3703c2a50b4c 100644 --- a/src/main/java/com/stripe/model/InvoiceItem.java +++ b/src/main/java/com/stripe/model/InvoiceItem.java @@ -654,8 +654,9 @@ public void setPriceObject(Price expandableObject) { @EqualsAndHashCode(callSuper = false) public static class ProrationDetails extends StripeObject { /** - * For a credit proration, links to the debit invoice line items or invoice item that the credit - * applies to. + * For a credit proration, links to the debit that the credit applies to. The reference is to an + * invoice item if the debit was pending when the credit was created, and to invoice line items + * if the debit was already invoiced. */ @SerializedName("credited_items") CreditedItems creditedItems; diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index 5f21b900bd24..3f5285b78af5 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -1246,6 +1246,13 @@ public static class Card extends StripeObject { @SerializedName("network_transaction_id") String networkTransactionId; + /** + * The transaction type that was passed for an off-session, Merchant-Initiated transaction, + * one of {@code recurring} or {@code unscheduled}. + */ + @SerializedName("stored_credential_usage") + String storedCredentialUsage; + /** Populated if this transaction used 3D Secure authentication. */ @SerializedName("three_d_secure") ThreeDSecure threeDSecure; @@ -1821,8 +1828,8 @@ public static class Crypto extends StripeObject { /** * The token currency that the transaction was sent with. * - *

One of {@code phantom_cash}, {@code usdc}, {@code usdg}, {@code usdp}, {@code usdsui}, - * or {@code usdt}. + *

One of {@code ousd}, {@code phantom_cash}, {@code usdc}, {@code usdg}, {@code usdp}, + * {@code usdsui}, or {@code usdt}. */ @SerializedName("token_currency") String tokenCurrency; diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index f7f6a4d1246f..26f8e1360054 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -3750,6 +3750,14 @@ public static class Card extends StripeObject { @SerializedName("require_cvc_recollection") Boolean requireCvcRecollection; + /** + * Set to indicate the future transaction type usage for the card being set up. + * + *

One of {@code installment}, {@code recurring}, or {@code unscheduled}. + */ + @SerializedName("setup_credential_usage") + String setupCredentialUsage; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -3794,6 +3802,14 @@ public static class Card extends StripeObject { @SerializedName("statement_descriptor_suffix_kanji") String statementDescriptorSuffixKanji; + /** + * Selected usage to indicate the transaction type of the off-session payment. + * + *

One of {@code installment}, {@code recurring}, or {@code unscheduled}. + */ + @SerializedName("stored_credential_usage") + String storedCredentialUsage; + /** * For more details about Installments, please refer to the API Reference. @@ -5098,11 +5114,20 @@ public static class Pix extends StripeObject { @SerializedName("amount_includes_iof") String amountIncludesIof; - /** The number of seconds (between 10 and 1209600) after which Pix payment will expire. */ + /** + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and + * 1209600, inclusive). If neither expiration option is supplied, defaults to 14400 seconds (4 + * hours). Mutually exclusive with {@code expires_at}. + */ @SerializedName("expires_after_seconds") Long expiresAfterSeconds; - /** The timestamp at which the Pix expires. */ + /** + * The absolute Unix timestamp at which the Pix expires. When supplied as an input, it must be + * between 60 and 1209600 seconds from the current time at validation, inclusive. If neither + * expiration option is supplied, the Pix expires 14400 seconds (4 hours) after PaymentIntent + * confirmation. Mutually exclusive with {@code expires_after_seconds}. + */ @SerializedName("expires_at") Long expiresAt; diff --git a/src/main/java/com/stripe/model/PaymentLink.java b/src/main/java/com/stripe/model/PaymentLink.java index 89b334778f44..deb1eeaa65ea 100644 --- a/src/main/java/com/stripe/model/PaymentLink.java +++ b/src/main/java/com/stripe/model/PaymentLink.java @@ -1430,9 +1430,89 @@ public static class SubscriptionData extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class InvoiceSettings extends StripeObject { + /** + * The account tax IDs associated with the subscription. Will be set on invoices generated by + * the subscription. + */ + @SerializedName("account_tax_ids") + List> accountTaxIds; + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + List customFields; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + String footer; + @SerializedName("issuer") Issuer issuer; + /** Get IDs of expandable {@code accountTaxIds} object list. */ + public List getAccountTaxIds() { + return (this.accountTaxIds != null) + ? this.accountTaxIds.stream().map(x -> x.getId()).collect(Collectors.toList()) + : null; + } + + public void setAccountTaxIds(List ids) { + if (ids == null) { + this.accountTaxIds = null; + return; + } + if (this.accountTaxIds != null + && this.accountTaxIds.stream() + .map(x -> x.getId()) + .collect(Collectors.toList()) + .equals(ids)) { + // noop if the ids are equal to what are already present + return; + } + this.accountTaxIds = + (ids != null) + ? ids.stream() + .map(id -> new ExpandableField(id, null)) + .collect(Collectors.toList()) + : null; + } + + /** Get expanded {@code accountTaxIds}. */ + public List getAccountTaxIdObjects() { + return (this.accountTaxIds != null) + ? this.accountTaxIds.stream().map(x -> x.getExpanded()).collect(Collectors.toList()) + : null; + } + + public void setAccountTaxIdObjects(List objs) { + this.accountTaxIds = + objs != null + ? objs.stream() + .map(x -> new ExpandableField(x.getId(), x)) + .collect(Collectors.toList()) + : null; + } + + /** + * For more details about CustomField, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomField extends StripeObject { + /** The name of the custom field. */ + @SerializedName("name") + String name; + + /** The value of the custom field. */ + @SerializedName("value") + String value; + } + /** * For more details about Issuer, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index be37fa31a8cb..99c013610d18 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -1584,6 +1584,13 @@ public static class Card extends StripeObject { @SerializedName("network_transaction_id") String networkTransactionId; + /** + * The transaction type that was passed for an off-session, Merchant-Initiated transaction, + * one of {@code recurring} or {@code unscheduled}. + */ + @SerializedName("stored_credential_usage") + String storedCredentialUsage; + /** Populated if this transaction used 3D Secure authentication. */ @SerializedName("three_d_secure") ThreeDSecure threeDSecure; @@ -2159,8 +2166,8 @@ public static class Crypto extends StripeObject { /** * The token currency that the transaction was sent with. * - *

One of {@code phantom_cash}, {@code usdc}, {@code usdg}, {@code usdp}, {@code usdsui}, - * or {@code usdt}. + *

One of {@code ousd}, {@code phantom_cash}, {@code usdc}, {@code usdg}, {@code usdp}, + * {@code usdsui}, or {@code usdt}. */ @SerializedName("token_currency") String tokenCurrency; diff --git a/src/main/java/com/stripe/model/Payout.java b/src/main/java/com/stripe/model/Payout.java index 9aded0baefb0..892f47b96a45 100644 --- a/src/main/java/com/stripe/model/Payout.java +++ b/src/main/java/com/stripe/model/Payout.java @@ -111,10 +111,7 @@ public class Payout extends ApiResource implements MetadataStore, Balanc @Setter(lombok.AccessLevel.NONE) ExpandableField failureBalanceTransaction; - /** - * Error code that provides a reason for a payout failure, if available. View our list of failure codes. - */ + /** Error code that provides a reason for a payout failure, if available. */ @SerializedName("failure_code") String failureCode; diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index 49b73acddfa1..e55e6b6c2b36 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -780,7 +780,18 @@ public static class Affirm extends StripeObject {} @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class AfterpayClearpay extends StripeObject {} + public static class AfterpayClearpay extends StripeObject { + /** The reference assigned to the refund. */ + @SerializedName("reference") + String reference; + + /** + * Status of the reference on the refund. This can be {@code pending}, {@code available} or + * {@code unavailable}. + */ + @SerializedName("reference_status") + String referenceStatus; + } /** * For more details about Alipay, please refer to the API @@ -1022,7 +1033,18 @@ public static class JpBankTransfer extends StripeObject { @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Klarna extends StripeObject {} + public static class Klarna extends StripeObject { + /** The reference assigned to the refund. */ + @SerializedName("reference") + String reference; + + /** + * Status of the reference on the refund. This can be {@code pending}, {@code available} or + * {@code unavailable}. + */ + @SerializedName("reference_status") + String referenceStatus; + } /** * For more details about MbWay, please refer to the API @@ -1136,6 +1158,17 @@ public static class Paypal extends StripeObject { */ @SerializedName("network_decline_code") String networkDeclineCode; + + /** The reference assigned to the refund. */ + @SerializedName("reference") + String reference; + + /** + * Status of the reference on the refund. This can be {@code pending}, {@code available} or + * {@code unavailable}. + */ + @SerializedName("reference_status") + String referenceStatus; } /** diff --git a/src/main/java/com/stripe/model/SetupIntent.java b/src/main/java/com/stripe/model/SetupIntent.java index 41491a6b2444..96574327ccb5 100644 --- a/src/main/java/com/stripe/model/SetupIntent.java +++ b/src/main/java/com/stripe/model/SetupIntent.java @@ -1367,6 +1367,14 @@ public static class Card extends StripeObject { @SerializedName("request_three_d_secure") String requestThreeDSecure; + /** + * Set to indicate the future transaction type usage for the card being set up. + * + *

One of {@code installment}, {@code recurring}, or {@code unscheduled}. + */ + @SerializedName("setup_credential_usage") + String setupCredentialUsage; + /** * For more details about MandateOptions, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/Source.java b/src/main/java/com/stripe/model/Source.java index b530a2c3410f..0fae0aa05d75 100644 --- a/src/main/java/com/stripe/model/Source.java +++ b/src/main/java/com/stripe/model/Source.java @@ -26,10 +26,8 @@ * customer's payment instrument, and can be used with the Stripe API just like a {@code Card} * object: once chargeable, they can be charged, or can be attached to customers. * - *

Stripe doesn't recommend using the deprecated Sources API. We recommend that you adopt the PaymentMethods API. This newer API - * provides access to our latest features and payment method types. + *

This API is deprecated. Use the PaymentMethods API instead. * *

Related guides: Sources API and Sources & Customers. diff --git a/src/main/java/com/stripe/model/SourceMandateNotification.java b/src/main/java/com/stripe/model/SourceMandateNotification.java index 47cf5d94eac4..7f2b651289aa 100644 --- a/src/main/java/com/stripe/model/SourceMandateNotification.java +++ b/src/main/java/com/stripe/model/SourceMandateNotification.java @@ -68,10 +68,8 @@ public class SourceMandateNotification extends StripeObject implements HasId { * customer's payment instrument, and can be used with the Stripe API just like a {@code Card} * object: once chargeable, they can be charged, or can be attached to customers. * - *

Stripe doesn't recommend using the deprecated Sources API. We recommend that you adopt the PaymentMethods API. This newer API - * provides access to our latest features and payment method types. + *

This API is deprecated. Use the PaymentMethods API instead. * *

Related guides: Sources API and Sources & Customers. diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index 508c56d8c9bd..57e3ea126d66 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -111,14 +111,18 @@ public class StripeError extends StripeObject { * setup_intent_mandate_invalid}, {@code setup_intent_mobile_wallet_unsupported}, {@code * setup_intent_setup_attempt_expired}, {@code setup_intent_unexpected_state}, {@code * shipping_address_invalid}, {@code shipping_calculation_failed}, {@code siret_invalid}, {@code - * sku_inactive}, {@code state_unsupported}, {@code status_transition_invalid}, {@code - * storer_capability_missing}, {@code storer_capability_not_active}, {@code stripe_tax_inactive}, - * {@code tax_id_invalid}, {@code tax_id_prohibited}, {@code taxes_calculation_failed}, {@code + * sku_inactive}, {@code smart_disputes_not_available}, {@code state_unsupported}, {@code + * status_transition_invalid}, {@code storer_capability_missing}, {@code + * storer_capability_not_active}, {@code stripe_tax_inactive}, {@code + * subscription_update_trial_after_billing_cycle_anchor}, {@code tax_id_invalid}, {@code + * tax_id_prohibited}, {@code taxes_calculation_failed}, {@code * terminal_location_country_unsupported}, {@code terminal_reader_busy}, {@code * terminal_reader_hardware_fault}, {@code terminal_reader_invalid_location_for_activation}, * {@code terminal_reader_invalid_location_for_payment}, {@code terminal_reader_offline}, {@code - * terminal_reader_timeout}, {@code testmode_charges_only}, {@code tls_version_unsupported}, - * {@code token_already_used}, {@code token_card_network_invalid}, {@code token_in_use}, {@code + * terminal_reader_timeout}, {@code testmode_charges_only}, {@code + * three_d_secure_authentication_not_supported}, {@code + * three_d_secure_authentication_upstream_error}, {@code tls_version_unsupported}, {@code + * token_already_used}, {@code token_card_network_invalid}, {@code token_in_use}, {@code * transfer_source_balance_parameters_mismatch}, {@code transfers_not_allowed}, or {@code * url_invalid}. */ diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index cafee8d39039..cae840bbeb8d 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -343,11 +343,12 @@ public class Subscription extends ApiResource implements HasId, MetadataStoreA subscription that is currently in a trial period is {@code trialing} and moves to {@code * active} when the trial period is over. * - *

A subscription can only enter a {@code paused} status A subscription can enter a {@code paused} status in several ways, including when - * a trial ends without a payment method. A {@code paused} subscription doesn't generate - * invoices and can be resumed after your customer adds their payment method. The {@code paused} - * status is different from or when you pause it using the pause endpoint. A {@code paused} + * subscription doesn't advance to a new billing period or generate invoices until it resumes. The + * {@code paused} status is different from pausing collection, * which still generates invoices and leaves the subscription's status unchanged. * @@ -610,8 +611,9 @@ public void setDiscountObjects(List objs) { * subscription. After it’s canceled, the subscription is largely immutable. You can still update * its metadata and {@code cancellation_details}. * - *

Any pending invoice items that you’ve created are still charged at the end of the period, - * unless manually deleted. If you’ve set + *

Pending invoice items are included on a final invoice if you generate one. Otherwise, they + * remain pending and can be billed on another invoice for the customer. To prevent billing, + * manually delete them. If you’ve set * the subscription to cancel at the end of the period, any pending prorations are also left in * place and collected at the end of the period. But if the subscription is set to cancel * immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both @@ -632,8 +634,9 @@ public Subscription cancel() throws StripeException { * subscription. After it’s canceled, the subscription is largely immutable. You can still update * its metadata and {@code cancellation_details}. * - *

Any pending invoice items that you’ve created are still charged at the end of the period, - * unless manually deleted. If you’ve set + *

Pending invoice items are included on a final invoice if you generate one. Otherwise, they + * remain pending and can be billed on another invoice for the customer. To prevent billing, + * manually delete them. If you’ve set * the subscription to cancel at the end of the period, any pending prorations are also left in * place and collected at the end of the period. But if the subscription is set to cancel * immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both @@ -654,8 +657,9 @@ public Subscription cancel(Map params) throws StripeException { * subscription. After it’s canceled, the subscription is largely immutable. You can still update * its metadata and {@code cancellation_details}. * - *

Any pending invoice items that you’ve created are still charged at the end of the period, - * unless manually deleted. If you’ve set + *

Pending invoice items are included on a final invoice if you generate one. Otherwise, they + * remain pending and can be billed on another invoice for the customer. To prevent billing, + * manually delete them. If you’ve set * the subscription to cancel at the end of the period, any pending prorations are also left in * place and collected at the end of the period. But if the subscription is set to cancel * immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both @@ -680,8 +684,9 @@ public Subscription cancel(Map params, RequestOptions options) * subscription. After it’s canceled, the subscription is largely immutable. You can still update * its metadata and {@code cancellation_details}. * - *

Any pending invoice items that you’ve created are still charged at the end of the period, - * unless manually deleted. If you’ve set + *

Pending invoice items are included on a final invoice if you generate one. Otherwise, they + * remain pending and can be billed on another invoice for the customer. To prevent billing, + * manually delete them. If you’ve set * the subscription to cancel at the end of the period, any pending prorations are also left in * place and collected at the end of the period. But if the subscription is set to cancel * immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both @@ -702,8 +707,9 @@ public Subscription cancel(SubscriptionCancelParams params) throws StripeExcepti * subscription. After it’s canceled, the subscription is largely immutable. You can still update * its metadata and {@code cancellation_details}. * - *

Any pending invoice items that you’ve created are still charged at the end of the period, - * unless manually deleted. If you’ve set + *

Pending invoice items are included on a final invoice if you generate one. Otherwise, they + * remain pending and can be billed on another invoice for the customer. To prevent billing, + * manually delete them. If you’ve set * the subscription to cancel at the end of the period, any pending prorations are also left in * place and collected at the end of the period. But if the subscription is set to cancel * immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both @@ -2409,8 +2415,8 @@ public static class MandateOptions extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Pix extends StripeObject { /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). */ @SerializedName("expires_after_seconds") Long expiresAfterSeconds; diff --git a/src/main/java/com/stripe/model/SubscriptionItem.java b/src/main/java/com/stripe/model/SubscriptionItem.java index 5e4530cbc55a..51b384e20eb0 100644 --- a/src/main/java/com/stripe/model/SubscriptionItem.java +++ b/src/main/java/com/stripe/model/SubscriptionItem.java @@ -413,12 +413,15 @@ public static class BillingThresholds extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class CurrentTrial extends StripeObject { + /** The time the current trial ends. */ @SerializedName("end_date") Long endDate; + /** The time the current trial started. */ @SerializedName("start_date") Long startDate; + /** The Trial Offer ID applied to the subscription item. */ @SerializedName("trial_offer") String trialOffer; } diff --git a/src/main/java/com/stripe/model/TaxId.java b/src/main/java/com/stripe/model/TaxId.java index fe2675400d14..e92fb18dfb59 100644 --- a/src/main/java/com/stripe/model/TaxId.java +++ b/src/main/java/com/stripe/model/TaxId.java @@ -78,27 +78,30 @@ public class TaxId extends ApiResource implements HasId { /** * Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, {@code al_tin}, {@code am_tin}, - * {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_arn}, {@code aw_tin}, {@code - * az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, {@code bf_ifu}, {@code bg_uic}, {@code - * bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code bs_tin}, - * {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code - * ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code cl_tin}, - * {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, - * {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code - * eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, - * {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, - * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, - * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, - * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, - * {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code - * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code - * sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, - * {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, - * {@code za_vat}, {@code zm_tin}, or {@code zw_tin}. Note that some legacy tax IDs have type - * {@code unknown} + * {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_acn}, {@code au_arn}, {@code + * au_wpn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, {@code + * bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code br_cnpj}, + * {@code br_cpf}, {@code bs_tin}, {@code bw_vat}, {@code by_tin}, {@code ca_bn}, {@code + * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code + * cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code ci_vat}, {@code cl_tin}, {@code cm_niu}, {@code + * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code cz_dic}, {@code de_stn}, {@code + * do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, + * {@code eu_vat}, {@code fo_vat}, {@code fr_siren}, {@code fr_siret}, {@code fr_spi}, {@code + * gb_vat}, {@code ge_vat}, {@code gh_tin}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code + * hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, + * {@code is_kt}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, + * {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_cf}, {@code md_vat}, + * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mu_vat}, {@code mx_rfc}, {@code my_frp}, + * {@code my_itn}, {@code my_sst}, {@code mz_nuit}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code np_pan}, {@code nz_bn}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code + * ph_tin}, {@code pl_nip}, {@code pt_nif}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code + * ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code + * sm_coe}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, + * {@code tr_tin}, {@code tt_bir}, {@code tt_vat}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, + * {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin}. Note that some legacy tax + * IDs have type {@code unknown} */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/TaxRate.java b/src/main/java/com/stripe/model/TaxRate.java index 10ead7e85e30..992d3a9a37e4 100644 --- a/src/main/java/com/stripe/model/TaxRate.java +++ b/src/main/java/com/stripe/model/TaxRate.java @@ -158,11 +158,13 @@ public class TaxRate extends ApiResource implements HasId, MetadataStoreOne of {@code amusement_tax}, {@code communications_tax}, {@code digital_excise_tax}, {@code - * gst}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax}, {@code - * mass_transit_parking_tax}, {@code parking_tax}, {@code pst}, {@code qst}, {@code - * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, {@code - * utility_users_tax}, or {@code vat}. + *

One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code + * communications_tax}, {@code digital_excise_tax}, {@code entertainment_tax}, {@code get_fund}, + * {@code gross_receipts_tax}, {@code gst}, {@code hospitality_tax}, {@code hst}, {@code igst}, + * {@code jct}, {@code lease_tax}, {@code luxury_tax}, {@code mass_transit_parking_tax}, {@code + * nhil}, {@code parking_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code + * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, {@code tourism_tax}, + * {@code utility_users_tax}, or {@code vat}. */ @SerializedName("tax_type") String taxType; diff --git a/src/main/java/com/stripe/model/Token.java b/src/main/java/com/stripe/model/Token.java index 9b89c2e5b563..8ad10eb6edd6 100644 --- a/src/main/java/com/stripe/model/Token.java +++ b/src/main/java/com/stripe/model/Token.java @@ -57,6 +57,9 @@ public class Token extends ApiResource implements HasId { * You can store multiple cards on a customer in order to charge the customer later. You can also * store multiple debit cards on a recipient in order to transfer to those cards later. * + *

This API is deprecated. Use the PaymentMethods API instead. + * *

Related guide: Card payments with * Sources */ diff --git a/src/main/java/com/stripe/model/apps/Install.java b/src/main/java/com/stripe/model/apps/Install.java index b519e18f1044..f4ad8f10fcc6 100644 --- a/src/main/java/com/stripe/model/apps/Install.java +++ b/src/main/java/com/stripe/model/apps/Install.java @@ -126,10 +126,11 @@ public class Install extends ApiResource implements HasId { /** * Creates an app install. An account installs its own private app with its own key; public and - * testing installs are made from the Dashboard. An app developer or embedding platform acting on - * a connected account through {@code Stripe-Account} installs or reinstalls its app there. For a - * private app, creating an install installs the newest completed upload; when that version is - * already installed with nothing pending, the existing install is returned. + * testing installs are made from the Dashboard. An app developer acting on a connected account + * through {@code Stripe-Account} installs or reinstalls its app there, and an embedding platform + * can do the same once the app’s developer approves its request to embed the app. For a private + * app, creating an install installs the newest completed upload; when that version is already + * installed with nothing pending, the existing install is returned. */ public static Install create(Map params) throws StripeException { return create(params, (RequestOptions) null); @@ -137,10 +138,11 @@ public static Install create(Map params) throws StripeException /** * Creates an app install. An account installs its own private app with its own key; public and - * testing installs are made from the Dashboard. An app developer or embedding platform acting on - * a connected account through {@code Stripe-Account} installs or reinstalls its app there. For a - * private app, creating an install installs the newest completed upload; when that version is - * already installed with nothing pending, the existing install is returned. + * testing installs are made from the Dashboard. An app developer acting on a connected account + * through {@code Stripe-Account} installs or reinstalls its app there, and an embedding platform + * can do the same once the app’s developer approves its request to embed the app. For a private + * app, creating an install installs the newest completed upload; when that version is already + * installed with nothing pending, the existing install is returned. */ public static Install create(Map params, RequestOptions options) throws StripeException { @@ -152,10 +154,11 @@ public static Install create(Map params, RequestOptions options) /** * Creates an app install. An account installs its own private app with its own key; public and - * testing installs are made from the Dashboard. An app developer or embedding platform acting on - * a connected account through {@code Stripe-Account} installs or reinstalls its app there. For a - * private app, creating an install installs the newest completed upload; when that version is - * already installed with nothing pending, the existing install is returned. + * testing installs are made from the Dashboard. An app developer acting on a connected account + * through {@code Stripe-Account} installs or reinstalls its app there, and an embedding platform + * can do the same once the app’s developer approves its request to embed the app. For a private + * app, creating an install installs the newest completed upload; when that version is already + * installed with nothing pending, the existing install is returned. */ public static Install create(InstallCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -163,10 +166,11 @@ public static Install create(InstallCreateParams params) throws StripeException /** * Creates an app install. An account installs its own private app with its own key; public and - * testing installs are made from the Dashboard. An app developer or embedding platform acting on - * a connected account through {@code Stripe-Account} installs or reinstalls its app there. For a - * private app, creating an install installs the newest completed upload; when that version is - * already installed with nothing pending, the existing install is returned. + * testing installs are made from the Dashboard. An app developer acting on a connected account + * through {@code Stripe-Account} installs or reinstalls its app there, and an embedding platform + * can do the same once the app’s developer approves its request to embed the app. For a private + * app, creating an install installs the newest completed upload; when that version is already + * installed with nothing pending, the existing install is returned. */ public static Install create(InstallCreateParams params, RequestOptions options) throws StripeException { @@ -183,24 +187,26 @@ public static Install create(InstallCreateParams params, RequestOptions options) } /** - * Returns a list of app installs. An app developer or embedding platform filtering by its own app - * sees the installs across the accounts that installed it; other callers see the installs on - * their own account. The key selects the environment: a live key lists live installs, a sandbox - * API key lists the installs on that sandbox, and the key of an app’s managed sandbox filtering - * by {@code app} lists that app’s installs across every sandbox. For existing accounts that still - * use legacy test mode, a test mode key lists legacy test mode installs. + * Returns a list of app installs. An app developer filtering by its own app with its own key sees + * that app’s installs across the accounts that installed it. An app developer acting on a + * connected account through {@code Stripe-Account} and filtering by its app sees that account’s + * installs of the app, and an embedding platform acting on a connected account sees only the + * installs it created there. Other callers see the installs on their own account. A live key + * lists live installs and a test key lists test installs; the key of an app’s managed sandbox + * filtering by {@code app} lists that app’s installs across every sandbox. */ public static InstallCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of app installs. An app developer or embedding platform filtering by its own app - * sees the installs across the accounts that installed it; other callers see the installs on - * their own account. The key selects the environment: a live key lists live installs, a sandbox - * API key lists the installs on that sandbox, and the key of an app’s managed sandbox filtering - * by {@code app} lists that app’s installs across every sandbox. For existing accounts that still - * use legacy test mode, a test mode key lists legacy test mode installs. + * Returns a list of app installs. An app developer filtering by its own app with its own key sees + * that app’s installs across the accounts that installed it. An app developer acting on a + * connected account through {@code Stripe-Account} and filtering by its app sees that account’s + * installs of the app, and an embedding platform acting on a connected account sees only the + * installs it created there. Other callers see the installs on their own account. A live key + * lists live installs and a test key lists test installs; the key of an app’s managed sandbox + * filtering by {@code app} lists that app’s installs across every sandbox. */ public static InstallCollection list(Map params, RequestOptions options) throws StripeException { @@ -211,24 +217,26 @@ public static InstallCollection list(Map params, RequestOptions } /** - * Returns a list of app installs. An app developer or embedding platform filtering by its own app - * sees the installs across the accounts that installed it; other callers see the installs on - * their own account. The key selects the environment: a live key lists live installs, a sandbox - * API key lists the installs on that sandbox, and the key of an app’s managed sandbox filtering - * by {@code app} lists that app’s installs across every sandbox. For existing accounts that still - * use legacy test mode, a test mode key lists legacy test mode installs. + * Returns a list of app installs. An app developer filtering by its own app with its own key sees + * that app’s installs across the accounts that installed it. An app developer acting on a + * connected account through {@code Stripe-Account} and filtering by its app sees that account’s + * installs of the app, and an embedding platform acting on a connected account sees only the + * installs it created there. Other callers see the installs on their own account. A live key + * lists live installs and a test key lists test installs; the key of an app’s managed sandbox + * filtering by {@code app} lists that app’s installs across every sandbox. */ public static InstallCollection list(InstallListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of app installs. An app developer or embedding platform filtering by its own app - * sees the installs across the accounts that installed it; other callers see the installs on - * their own account. The key selects the environment: a live key lists live installs, a sandbox - * API key lists the installs on that sandbox, and the key of an app’s managed sandbox filtering - * by {@code app} lists that app’s installs across every sandbox. For existing accounts that still - * use legacy test mode, a test mode key lists legacy test mode installs. + * Returns a list of app installs. An app developer filtering by its own app with its own key sees + * that app’s installs across the accounts that installed it. An app developer acting on a + * connected account through {@code Stripe-Account} and filtering by its app sees that account’s + * installs of the app, and an embedding platform acting on a connected account sees only the + * installs it created there. Other callers see the installs on their own account. A live key + * lists live installs and a test key lists test installs; the key of an app’s managed sandbox + * filtering by {@code app} lists that app’s installs across every sandbox. */ public static InstallCollection list(InstallListParams params, RequestOptions options) throws StripeException { @@ -343,9 +351,12 @@ public Install uninstall(InstallUninstallParams params, RequestOptions options) /** * Reauthorizes an app install. The installer grants the permissions, content security policy * entries, and endpoints that the version being installed requests. An account reauthorizes its - * own installs on any channel with its own key; app developers and embedding platforms - * reauthorize installs on connected accounts through {@code Stripe-Account}. For private apps, - * the version being installed is the newest completed upload. + * own installs on any channel with its own key, which grants all of that access, so only give + * {@code app_install_write} to keys that may approve an app’s access. App developers and + * embedding platforms reauthorize installs on connected accounts through {@code Stripe-Account}. + * An app developer can’t grant new access. An embedding platform can grant new access only once + * the app’s developer approves its request to embed the app. For private apps, the version being + * installed is the newest completed upload. */ public Install update(Map params) throws StripeException { return update(params, (RequestOptions) null); @@ -354,9 +365,12 @@ public Install update(Map params) throws StripeException { /** * Reauthorizes an app install. The installer grants the permissions, content security policy * entries, and endpoints that the version being installed requests. An account reauthorizes its - * own installs on any channel with its own key; app developers and embedding platforms - * reauthorize installs on connected accounts through {@code Stripe-Account}. For private apps, - * the version being installed is the newest completed upload. + * own installs on any channel with its own key, which grants all of that access, so only give + * {@code app_install_write} to keys that may approve an app’s access. App developers and + * embedding platforms reauthorize installs on connected accounts through {@code Stripe-Account}. + * An app developer can’t grant new access. An embedding platform can grant new access only once + * the app’s developer approves its request to embed the app. For private apps, the version being + * installed is the newest completed upload. */ public Install update(Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/apps/installs/%s", ApiResource.urlEncodeId(this.getId())); @@ -368,9 +382,12 @@ public Install update(Map params, RequestOptions options) throws /** * Reauthorizes an app install. The installer grants the permissions, content security policy * entries, and endpoints that the version being installed requests. An account reauthorizes its - * own installs on any channel with its own key; app developers and embedding platforms - * reauthorize installs on connected accounts through {@code Stripe-Account}. For private apps, - * the version being installed is the newest completed upload. + * own installs on any channel with its own key, which grants all of that access, so only give + * {@code app_install_write} to keys that may approve an app’s access. App developers and + * embedding platforms reauthorize installs on connected accounts through {@code Stripe-Account}. + * An app developer can’t grant new access. An embedding platform can grant new access only once + * the app’s developer approves its request to embed the app. For private apps, the version being + * installed is the newest completed upload. */ public Install update(InstallUpdateParams params) throws StripeException { return update(params, (RequestOptions) null); @@ -379,9 +396,12 @@ public Install update(InstallUpdateParams params) throws StripeException { /** * Reauthorizes an app install. The installer grants the permissions, content security policy * entries, and endpoints that the version being installed requests. An account reauthorizes its - * own installs on any channel with its own key; app developers and embedding platforms - * reauthorize installs on connected accounts through {@code Stripe-Account}. For private apps, - * the version being installed is the newest completed upload. + * own installs on any channel with its own key, which grants all of that access, so only give + * {@code app_install_write} to keys that may approve an app’s access. App developers and + * embedding platforms reauthorize installs on connected accounts through {@code Stripe-Account}. + * An app developer can’t grant new access. An embedding platform can grant new access only once + * the app’s developer approves its request to embed the app. For private apps, the version being + * installed is the newest completed upload. */ public Install update(InstallUpdateParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/apps/installs/%s", ApiResource.urlEncodeId(this.getId())); diff --git a/src/main/java/com/stripe/model/billingportal/Configuration.java b/src/main/java/com/stripe/model/billingportal/Configuration.java index 8743880e04b5..60da2d91b98f 100644 --- a/src/main/java/com/stripe/model/billingportal/Configuration.java +++ b/src/main/java/com/stripe/model/billingportal/Configuration.java @@ -321,6 +321,9 @@ public static class Features extends StripeObject { @SerializedName("subscription_cancel") SubscriptionCancel subscriptionCancel; + @SerializedName("subscription_pause") + SubscriptionPause subscriptionPause; + @SerializedName("subscription_update") SubscriptionUpdate subscriptionUpdate; @@ -476,6 +479,68 @@ public void setFeedbackOptionObjects(List objs) { } } + /** + * For more details about SubscriptionPause, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SubscriptionPause extends StripeObject { + @SerializedName("duration") + Duration duration; + + /** + * Whether the feature is enabled. Customers can only pause subscriptions in the redesigned customer portal. + */ + @SerializedName("enabled") + Boolean enabled; + + /** + * For more details about Duration, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Duration extends StripeObject { + /** The preset pause durations customers can choose from. */ + @SerializedName("interval_options") + List intervalOptions; + + /** + * Whether subscriptions can be paused indefinitely or for a preset duration. + * + *

One of {@code indefinite}, or {@code interval_options}. + */ + @SerializedName("type") + String type; + + /** + * For more details about IntervalOption, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IntervalOption extends StripeObject { + /** + * Specifies the pause duration unit. Either {@code day}, {@code week}, {@code month}, or + * {@code year}. + * + *

One of {@code day}, {@code month}, {@code week}, or {@code year}. + */ + @SerializedName("interval") + String interval; + + /** The number of intervals in the pause duration. The maximum duration is three years. */ + @SerializedName("interval_count") + Long intervalCount; + } + } + } + /** * For more details about SubscriptionUpdate, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/billingportal/Session.java b/src/main/java/com/stripe/model/billingportal/Session.java index afff2ef10fcf..730c184f760e 100644 --- a/src/main/java/com/stripe/model/billingportal/Session.java +++ b/src/main/java/com/stripe/model/billingportal/Session.java @@ -37,6 +37,10 @@ @Setter @EqualsAndHashCode(callSuper = false) public class Session extends ApiResource implements HasId { + /** Behavior after the portal session expires. */ + @SerializedName("after_expiration") + AfterExpiration afterExpiration; + /** The configuration used by this session, describing the features available. */ @SerializedName("configuration") @Getter(lombok.AccessLevel.NONE) @@ -175,6 +179,40 @@ public static Session create(SessionCreateParams params, RequestOptions options) return getGlobalResponseGetter().request(request, Session.class); } + /** + * For more details about AfterExpiration, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AfterExpiration extends StripeObject { + /** Configuration for authenticating the customer after the session expires. */ + @SerializedName("customer_login") + CustomerLogin customerLogin; + + /** + * The behavior to apply when the session expires. + * + *

Equal to {@code customer_login}. + */ + @SerializedName("type") + String type; + + /** + * For more details about CustomerLogin, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomerLogin extends StripeObject { + /** The time after which the customer can no longer recover this session. */ + @SerializedName("expires_at") + Long expiresAt; + } + } + /** * For more details about Flow, please refer to the API * Reference. @@ -194,6 +232,10 @@ public static class Flow extends StripeObject { @SerializedName("subscription_cancel") SubscriptionCancel subscriptionCancel; + /** Configuration when {@code flow.type=subscription_pause}. */ + @SerializedName("subscription_pause") + SubscriptionPause subscriptionPause; + /** Configuration when {@code flow.type=subscription_update}. */ @SerializedName("subscription_update") SubscriptionUpdate subscriptionUpdate; @@ -206,7 +248,8 @@ public static class Flow extends StripeObject { * Type of flow that the customer will go through. * *

One of {@code customer_update}, {@code payment_method_update}, {@code - * subscription_cancel}, {@code subscription_update}, or {@code subscription_update_confirm}. + * subscription_cancel}, {@code subscription_pause}, {@code subscription_update}, or {@code + * subscription_update_confirm}. */ @SerializedName("type") String type; @@ -322,6 +365,19 @@ public static class CouponOffer extends StripeObject { } } + /** + * For more details about SubscriptionPause, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SubscriptionPause extends StripeObject { + /** The ID of the subscription to be paused. */ + @SerializedName("subscription") + String subscription; + } + /** * For more details about SubscriptionUpdate, please refer to the API Reference. @@ -415,6 +471,7 @@ public static class Item extends StripeObject implements HasId { @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); + trySetResponseGetter(afterExpiration, responseGetter); trySetResponseGetter(configuration, responseGetter); trySetResponseGetter(flow, responseGetter); } diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index deeda630eb0f..1432a5348c06 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -266,10 +266,10 @@ public class Session extends ApiResource implements HasId, MetadataStoreOne of {@code auto}, {@code bg}, {@code cs}, {@code da}, {@code de}, {@code el}, {@code en}, * {@code en-GB}, {@code es}, {@code es-419}, {@code et}, {@code fi}, {@code fil}, {@code fr}, - * {@code fr-CA}, {@code hr}, {@code hu}, {@code id}, {@code it}, {@code ja}, {@code ko}, {@code - * lt}, {@code lv}, {@code ms}, {@code mt}, {@code nb}, {@code nl}, {@code pl}, {@code pt}, {@code - * pt-BR}, {@code ro}, {@code ru}, {@code sk}, {@code sl}, {@code sv}, {@code th}, {@code tr}, - * {@code vi}, {@code zh}, {@code zh-HK}, or {@code zh-TW}. + * {@code fr-CA}, {@code hi-IN}, {@code hr}, {@code hu}, {@code id}, {@code it}, {@code ja}, + * {@code ko}, {@code lt}, {@code lv}, {@code ms}, {@code mt}, {@code nb}, {@code nl}, {@code pl}, + * {@code pt}, {@code pt-BR}, {@code ro}, {@code ru}, {@code sk}, {@code sl}, {@code sv}, {@code + * th}, {@code tr}, {@code vi}, {@code zh}, {@code zh-HK}, or {@code zh-TW}. */ @SerializedName("locale") String locale; @@ -341,8 +341,8 @@ public class Session extends ApiResource implements HasId, MetadataStore paymentLink; /** - * Configure whether a Checkout Session should collect a payment method for sessions with mode - * {@code payment}. Defaults to {@code always}. + * Configure whether a Checkout Session should collect a payment method. Can only be set in {@code + * subscription} mode. Defaults to {@code always}. * *

One of {@code always}, or {@code if_required}. */ @@ -1612,9 +1612,12 @@ public static class TaxId extends StripeObject { * bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, * {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code * np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, - * {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code - * la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, {@code ic_nif}, or {@code - * unknown}. + * {@code az_tin}, {@code bd_bin}, {@code au_acn}, {@code nz_bn}, {@code pt_nif}, {@code + * cz_dic}, {@code fr_siret}, {@code fr_siren}, {@code fr_spi}, {@code sm_coe}, {@code + * tt_vat}, {@code tt_bir}, {@code mu_vat}, {@code mz_nuit}, {@code au_wpn}, {@code md_cf}, + * {@code is_kt}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, {@code + * cm_niu}, {@code cv_nif}, {@code bf_ifu}, {@code ic_nif}, {@code gh_tin}, {@code bw_vat}, + * {@code ci_vat}, or {@code unknown}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/financialconnections/Account.java b/src/main/java/com/stripe/model/financialconnections/Account.java index c3441a2beb81..6263eaacfc1c 100644 --- a/src/main/java/com/stripe/model/financialconnections/Account.java +++ b/src/main/java/com/stripe/model/financialconnections/Account.java @@ -97,7 +97,10 @@ public class Account extends ApiResource implements HasId { @SerializedName("object") String object; - /** The most recent information about the account's owners. */ + /** + * The ID of the Financial + * Connections Account Ownership object associated with this account. + */ @SerializedName("ownership") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java index 00fea1100ebc..ad38cd6e085e 100644 --- a/src/main/java/com/stripe/model/issuing/Card.java +++ b/src/main/java/com/stripe/model/issuing/Card.java @@ -515,6 +515,13 @@ public static class Shipping extends StripeObject { @SerializedName("customs") Customs customs; + /** + * The time the card was reported as delivered. Null for undelivered or untracked shipments, or + * if Stripe has not recorded a delivery time. + */ + @SerializedName("delivered_at") + Long deliveredAt; + /** A unix timestamp representing a best estimate of when the card will be delivered. */ @SerializedName("eta") Long eta; @@ -548,6 +555,12 @@ public static class Shipping extends StripeObject { @SerializedName("service") String service; + /** + * The time the card was reported as shipped. Null if Stripe has not recorded a shipment time. + */ + @SerializedName("shipped_at") + Long shippedAt; + /** * The delivery status of the card. * diff --git a/src/main/java/com/stripe/model/tax/Calculation.java b/src/main/java/com/stripe/model/tax/Calculation.java index d2bdace62158..7b2591ca6438 100644 --- a/src/main/java/com/stripe/model/tax/Calculation.java +++ b/src/main/java/com/stripe/model/tax/Calculation.java @@ -345,9 +345,12 @@ public static class TaxId extends StripeObject { * bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, * {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code * np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, - * {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code - * la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, {@code ic_nif}, or {@code - * unknown}. + * {@code az_tin}, {@code bd_bin}, {@code au_acn}, {@code nz_bn}, {@code pt_nif}, {@code + * cz_dic}, {@code fr_siret}, {@code fr_siren}, {@code fr_spi}, {@code sm_coe}, {@code + * tt_vat}, {@code tt_bir}, {@code mu_vat}, {@code mz_nuit}, {@code au_wpn}, {@code md_cf}, + * {@code is_kt}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, {@code + * cm_niu}, {@code cv_nif}, {@code bf_ifu}, {@code ic_nif}, {@code gh_tin}, {@code bw_vat}, + * {@code ci_vat}, or {@code unknown}. */ @SerializedName("type") String type; @@ -575,11 +578,12 @@ public static class TaxRateDetails extends StripeObject { * *

One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code * communications_tax}, {@code digital_excise_tax}, {@code entertainment_tax}, {@code - * gross_receipts_tax}, {@code gst}, {@code hospitality_tax}, {@code hst}, {@code igst}, - * {@code jct}, {@code lease_tax}, {@code luxury_tax}, {@code mass_transit_parking_tax}, - * {@code parking_tax}, {@code pst}, {@code qst}, {@code recycling_fee}, {@code resort_tax}, - * {@code retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, {@code - * tourism_tax}, {@code utility_users_tax}, or {@code vat}. + * get_fund}, {@code gross_receipts_tax}, {@code gst}, {@code hospitality_tax}, {@code hst}, + * {@code igst}, {@code jct}, {@code lease_tax}, {@code luxury_tax}, {@code + * mass_transit_parking_tax}, {@code nhil}, {@code parking_tax}, {@code pst}, {@code qst}, + * {@code recycling_fee}, {@code resort_tax}, {@code retail_delivery_fee}, {@code rst}, + * {@code sales_tax}, {@code service_tax}, {@code tourism_tax}, {@code utility_users_tax}, + * or {@code vat}. */ @SerializedName("tax_type") String taxType; @@ -679,11 +683,12 @@ public static class TaxRateDetails extends StripeObject { * *

One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code * communications_tax}, {@code digital_excise_tax}, {@code entertainment_tax}, {@code - * gross_receipts_tax}, {@code gst}, {@code hospitality_tax}, {@code hst}, {@code igst}, - * {@code jct}, {@code lease_tax}, {@code luxury_tax}, {@code mass_transit_parking_tax}, - * {@code parking_tax}, {@code pst}, {@code qst}, {@code recycling_fee}, {@code resort_tax}, - * {@code retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, {@code - * tourism_tax}, {@code utility_users_tax}, or {@code vat}. + * get_fund}, {@code gross_receipts_tax}, {@code gst}, {@code hospitality_tax}, {@code hst}, + * {@code igst}, {@code jct}, {@code lease_tax}, {@code luxury_tax}, {@code + * mass_transit_parking_tax}, {@code nhil}, {@code parking_tax}, {@code pst}, {@code qst}, + * {@code recycling_fee}, {@code resort_tax}, {@code retail_delivery_fee}, {@code rst}, {@code + * sales_tax}, {@code service_tax}, {@code tourism_tax}, {@code utility_users_tax}, or {@code + * vat}. */ @SerializedName("tax_type") String taxType; diff --git a/src/main/java/com/stripe/model/tax/CalculationLineItem.java b/src/main/java/com/stripe/model/tax/CalculationLineItem.java index 470ca0f69a36..bfac1779f187 100644 --- a/src/main/java/com/stripe/model/tax/CalculationLineItem.java +++ b/src/main/java/com/stripe/model/tax/CalculationLineItem.java @@ -218,11 +218,12 @@ public static class TaxRateDetails extends StripeObject { * *

One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code * communications_tax}, {@code digital_excise_tax}, {@code entertainment_tax}, {@code - * gross_receipts_tax}, {@code gst}, {@code hospitality_tax}, {@code hst}, {@code igst}, - * {@code jct}, {@code lease_tax}, {@code luxury_tax}, {@code mass_transit_parking_tax}, - * {@code parking_tax}, {@code pst}, {@code qst}, {@code recycling_fee}, {@code resort_tax}, - * {@code retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, {@code - * tourism_tax}, {@code utility_users_tax}, or {@code vat}. + * get_fund}, {@code gross_receipts_tax}, {@code gst}, {@code hospitality_tax}, {@code hst}, + * {@code igst}, {@code jct}, {@code lease_tax}, {@code luxury_tax}, {@code + * mass_transit_parking_tax}, {@code nhil}, {@code parking_tax}, {@code pst}, {@code qst}, + * {@code recycling_fee}, {@code resort_tax}, {@code retail_delivery_fee}, {@code rst}, {@code + * sales_tax}, {@code service_tax}, {@code tourism_tax}, {@code utility_users_tax}, or {@code + * vat}. */ @SerializedName("tax_type") String taxType; diff --git a/src/main/java/com/stripe/model/tax/Registration.java b/src/main/java/com/stripe/model/tax/Registration.java index 7419621739b4..403a6d651776 100644 --- a/src/main/java/com/stripe/model/tax/Registration.java +++ b/src/main/java/com/stripe/model/tax/Registration.java @@ -306,6 +306,9 @@ public static class CountryOptions extends StripeObject { @SerializedName("bs") Bs bs; + @SerializedName("bw") + Bw bw; + @SerializedName("by") By by; @@ -318,6 +321,9 @@ public static class CountryOptions extends StripeObject { @SerializedName("ch") Ch ch; + @SerializedName("ci") + Ci ci; + @SerializedName("cl") Cl cl; @@ -372,6 +378,9 @@ public static class CountryOptions extends StripeObject { @SerializedName("ge") Ge ge; + @SerializedName("gh") + Gh gh; + @SerializedName("gn") Gn gn; @@ -450,6 +459,9 @@ public static class CountryOptions extends StripeObject { @SerializedName("mt") Mt mt; + @SerializedName("mu") + Mu mu; + @SerializedName("mx") Mx mx; @@ -947,6 +959,23 @@ public static class Bs extends StripeObject { String type; } + /** + * For more details about Bw, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Bw extends StripeObject { + /** + * Type of registration in {@code country}. + * + *

Equal to {@code simplified}. + */ + @SerializedName("type") + String type; + } + /** * For more details about By, please refer to the API * Reference. @@ -1054,6 +1083,23 @@ public static class Standard extends StripeObject { } } + /** + * For more details about Ci, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Ci extends StripeObject { + /** + * Type of registration in {@code country}. + * + *

Equal to {@code simplified}. + */ + @SerializedName("type") + String type; + } + /** * For more details about Cl, please refer to the API * Reference. @@ -1540,6 +1586,23 @@ public static class Ge extends StripeObject { String type; } + /** + * For more details about Gh, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Gh extends StripeObject { + /** + * Type of registration in {@code country}. + * + *

Equal to {@code simplified}. + */ + @SerializedName("type") + String type; + } + /** * For more details about Gn, please refer to the API * Reference. @@ -2182,6 +2245,23 @@ public static class Standard extends StripeObject { } } + /** + * For more details about Mu, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Mu extends StripeObject { + /** + * Type of registration in {@code country}. + * + *

Equal to {@code simplified}. + */ + @SerializedName("type") + String type; + } + /** * For more details about Mx, please refer to the API * Reference. @@ -2932,15 +3012,19 @@ public static class Us extends StripeObject { /** * Type of registration in the US. * - *

One of {@code admissions_tax}, {@code attendance_tax}, {@code entertainment_tax}, {@code - * gross_receipts_tax}, {@code hospitality_tax}, {@code local_amusement_tax}, {@code - * local_lease_tax}, {@code luxury_tax}, {@code mass_transit_parking_tax}, {@code - * parking_tax}, {@code resort_tax}, {@code state_communications_tax}, {@code - * state_retail_delivery_fee}, {@code state_sales_tax}, or {@code tourism_tax}. + *

One of {@code admissions_tax}, {@code attendance_tax}, {@code digital_excise_tax}, + * {@code entertainment_tax}, {@code gross_receipts_tax}, {@code hospitality_tax}, {@code + * local_amusement_tax}, {@code local_lease_tax}, {@code luxury_tax}, {@code + * mass_transit_parking_tax}, {@code parking_tax}, {@code resort_tax}, {@code + * state_communications_tax}, {@code state_retail_delivery_fee}, {@code state_sales_tax}, + * {@code tourism_tax}, or {@code utility_users_tax}. */ @SerializedName("type") String type; + @SerializedName("utility_users_tax") + UtilityUsersTax utilityUsersTax; + /** * For more details about AdmissionsTax, please refer to the API Reference. @@ -3180,6 +3264,23 @@ public static class TourismTax extends StripeObject { @SerializedName("jurisdiction") String jurisdiction; } + + /** + * For more details about UtilityUsersTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UtilityUsersTax extends StripeObject { + /** + * A jurisdiction + * code representing the local jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + } } /** diff --git a/src/main/java/com/stripe/model/tax/Transaction.java b/src/main/java/com/stripe/model/tax/Transaction.java index ebeb5f037c2c..9c1aeb5cfff4 100644 --- a/src/main/java/com/stripe/model/tax/Transaction.java +++ b/src/main/java/com/stripe/model/tax/Transaction.java @@ -390,9 +390,12 @@ public static class TaxId extends StripeObject { * bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, * {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code * np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, - * {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code - * la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, {@code ic_nif}, or {@code - * unknown}. + * {@code az_tin}, {@code bd_bin}, {@code au_acn}, {@code nz_bn}, {@code pt_nif}, {@code + * cz_dic}, {@code fr_siret}, {@code fr_siren}, {@code fr_spi}, {@code sm_coe}, {@code + * tt_vat}, {@code tt_bir}, {@code mu_vat}, {@code mz_nuit}, {@code au_wpn}, {@code md_cf}, + * {@code is_kt}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, {@code + * cm_niu}, {@code cv_nif}, {@code bf_ifu}, {@code ic_nif}, {@code gh_tin}, {@code bw_vat}, + * {@code ci_vat}, or {@code unknown}. */ @SerializedName("type") String type; @@ -636,11 +639,12 @@ public static class TaxRateDetails extends StripeObject { * *

One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code * communications_tax}, {@code digital_excise_tax}, {@code entertainment_tax}, {@code - * gross_receipts_tax}, {@code gst}, {@code hospitality_tax}, {@code hst}, {@code igst}, - * {@code jct}, {@code lease_tax}, {@code luxury_tax}, {@code mass_transit_parking_tax}, - * {@code parking_tax}, {@code pst}, {@code qst}, {@code recycling_fee}, {@code resort_tax}, - * {@code retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, {@code - * tourism_tax}, {@code utility_users_tax}, or {@code vat}. + * get_fund}, {@code gross_receipts_tax}, {@code gst}, {@code hospitality_tax}, {@code hst}, + * {@code igst}, {@code jct}, {@code lease_tax}, {@code luxury_tax}, {@code + * mass_transit_parking_tax}, {@code nhil}, {@code parking_tax}, {@code pst}, {@code qst}, + * {@code recycling_fee}, {@code resort_tax}, {@code retail_delivery_fee}, {@code rst}, + * {@code sales_tax}, {@code service_tax}, {@code tourism_tax}, {@code utility_users_tax}, + * or {@code vat}. */ @SerializedName("tax_type") String taxType; diff --git a/src/main/java/com/stripe/model/terminal/Configuration.java b/src/main/java/com/stripe/model/terminal/Configuration.java index 37b2c7502f13..28ebdc566e0f 100644 --- a/src/main/java/com/stripe/model/terminal/Configuration.java +++ b/src/main/java/com/stripe/model/terminal/Configuration.java @@ -77,6 +77,9 @@ public class Configuration extends ApiResource implements HasId { @SerializedName("offline") Offline offline; + @SerializedName("reader_security") + ReaderSecurity readerSecurity; + @SerializedName("reboot_window") RebootWindow rebootWindow; @@ -86,6 +89,9 @@ public class Configuration extends ApiResource implements HasId { @SerializedName("stripe_s710") StripeS710 stripeS710; + @SerializedName("stripe_t600") + StripeT600 stripeT600; + @SerializedName("tipping") Tipping tipping; @@ -371,6 +377,19 @@ public static class Offline extends StripeObject { Boolean enabled; } + /** + * For more details about ReaderSecurity, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ReaderSecurity extends StripeObject { + /** Passcode used to access a reader's admin menu. */ + @SerializedName("admin_menu_passcode") + String adminMenuPasscode; + } + /** * For more details about RebootWindow, please refer to the API Reference. @@ -457,6 +476,39 @@ public void setSplashscreenObject(File expandableObject) { } } + /** + * For more details about StripeT600, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StripeT600 extends StripeObject { + /** A File ID representing an image to display on the reader. */ + @SerializedName("splashscreen") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField splashscreen; + + /** Get ID of expandable {@code splashscreen} object. */ + public String getSplashscreen() { + return (this.splashscreen != null) ? this.splashscreen.getId() : null; + } + + public void setSplashscreen(String id) { + this.splashscreen = ApiResource.setExpandableFieldId(id, this.splashscreen); + } + + /** Get expanded {@code splashscreen}. */ + public File getSplashscreenObject() { + return (this.splashscreen != null) ? this.splashscreen.getExpanded() : null; + } + + public void setSplashscreenObject(File expandableObject) { + this.splashscreen = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + /** * For more details about Tipping, please refer to the API * Reference. @@ -1303,9 +1355,11 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(bbposWiseposE, responseGetter); trySetResponseGetter(cellular, responseGetter); trySetResponseGetter(offline, responseGetter); + trySetResponseGetter(readerSecurity, responseGetter); trySetResponseGetter(rebootWindow, responseGetter); trySetResponseGetter(stripeS700, responseGetter); trySetResponseGetter(stripeS710, responseGetter); + trySetResponseGetter(stripeT600, responseGetter); trySetResponseGetter(tipping, responseGetter); trySetResponseGetter(verifoneM425, responseGetter); trySetResponseGetter(verifoneP400, responseGetter); diff --git a/src/main/java/com/stripe/model/terminal/Reader.java b/src/main/java/com/stripe/model/terminal/Reader.java index 808222f7b8fd..6ea335f6e66e 100644 --- a/src/main/java/com/stripe/model/terminal/Reader.java +++ b/src/main/java/com/stripe/model/terminal/Reader.java @@ -67,10 +67,11 @@ public class Reader extends ApiResource implements HasId, MetadataStore * *

One of {@code bbpos_chipper2x}, {@code bbpos_wisepad3}, {@code bbpos_wisepos_e}, {@code * mobile_phone_reader}, {@code simulated_stripe_s700}, {@code simulated_stripe_s710}, {@code - * simulated_verifone_m425}, {@code simulated_verifone_p630}, {@code simulated_verifone_ux700}, - * {@code simulated_verifone_v660p}, {@code simulated_wisepos_e}, {@code stripe_m2}, {@code - * stripe_s700}, {@code stripe_s710}, {@code verifone_P400}, {@code verifone_m425}, {@code - * verifone_p630}, {@code verifone_ux700}, or {@code verifone_v660p}. + * simulated_stripe_t600}, {@code simulated_verifone_m425}, {@code simulated_verifone_p630}, + * {@code simulated_verifone_ux700}, {@code simulated_verifone_v660p}, {@code + * simulated_wisepos_e}, {@code stripe_m2}, {@code stripe_s700}, {@code stripe_s710}, {@code + * stripe_t600}, {@code verifone_P400}, {@code verifone_m425}, {@code verifone_p630}, {@code + * verifone_ux700}, or {@code verifone_v660p}. */ @SerializedName("device_type") String deviceType; diff --git a/src/main/java/com/stripe/model/treasury/CreditReversal.java b/src/main/java/com/stripe/model/treasury/CreditReversal.java index dcc3870a3e87..d632acea23ff 100644 --- a/src/main/java/com/stripe/model/treasury/CreditReversal.java +++ b/src/main/java/com/stripe/model/treasury/CreditReversal.java @@ -21,9 +21,16 @@ import lombok.Setter; /** - * You can reverse some ReceivedCredits - * depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a - * new object known as a CreditReversal. + * Legacy CreditReversals are part of the v1 version of Treasury for platforms and do not support + * many of the features introduced in Treasury + * for platforms v2. Use Received + * Credits instead of building a new v1 integration. + * + *

You can reverse some ReceivedCredits depending on their + * network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known + * as a CreditReversal. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/treasury/DebitReversal.java b/src/main/java/com/stripe/model/treasury/DebitReversal.java index df1d13e917fa..991e2c3f4f46 100644 --- a/src/main/java/com/stripe/model/treasury/DebitReversal.java +++ b/src/main/java/com/stripe/model/treasury/DebitReversal.java @@ -21,7 +21,11 @@ import lombok.Setter; /** - * You can reverse some ReceivedDebits + * Legacy DebitReversals are part of the v1 version of Treasury for platforms and do not support + * many of the features introduced in Treasury + * for platforms v2. + * + *

You can reverse some ReceivedDebits * depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a * new object known as a DebitReversal. */ diff --git a/src/main/java/com/stripe/model/treasury/FinancialAccount.java b/src/main/java/com/stripe/model/treasury/FinancialAccount.java index 0d446797c932..4ab2fdc52efc 100644 --- a/src/main/java/com/stripe/model/treasury/FinancialAccount.java +++ b/src/main/java/com/stripe/model/treasury/FinancialAccount.java @@ -26,9 +26,15 @@ import lombok.Setter; /** - * Stripe Treasury for Platforms provides users with a container for money called a FinancialAccount - * that is separate from their Payments balance. FinancialAccounts serve as the source and - * destination of Treasury for Platform’s money movement APIs. + * Legacy FinancialAccounts are part of the v1 version of Treasury for platforms and do not support + * many of the features introduced in Treasury + * for platforms v2. Use Financial Accounts + * instead of building a new v1 integration. + * + *

Stripe Treasury for Platforms provides users with a container for money called a + * FinancialAccount that is separate from their Payments balance. FinancialAccounts serve as the + * source and destination of Treasury for Platform’s money movement APIs. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/treasury/InboundTransfer.java b/src/main/java/com/stripe/model/treasury/InboundTransfer.java index ba6a824f41c2..ba17a8a1f759 100644 --- a/src/main/java/com/stripe/model/treasury/InboundTransfer.java +++ b/src/main/java/com/stripe/model/treasury/InboundTransfer.java @@ -27,7 +27,13 @@ import lombok.Setter; /** - * Use Treasury + * for platforms v2. Use Inbound Transfers + * instead of building a new v1 integration. + * + *

Use InboundTransfers * to add funds to your FinancialAccount via a PaymentMethod diff --git a/src/main/java/com/stripe/model/treasury/OutboundPayment.java b/src/main/java/com/stripe/model/treasury/OutboundPayment.java index 526c10e3262c..b20c9503f951 100644 --- a/src/main/java/com/stripe/model/treasury/OutboundPayment.java +++ b/src/main/java/com/stripe/model/treasury/OutboundPayment.java @@ -28,7 +28,13 @@ import lombok.Setter; /** - * Use Treasury + * for platforms v2. Use Outbound Payments + * instead of building a new v1 integration. + * + *

Use OutboundPayments * to send funds to another party's external bank account or FinancialAccount. To send money to an diff --git a/src/main/java/com/stripe/model/treasury/OutboundTransfer.java b/src/main/java/com/stripe/model/treasury/OutboundTransfer.java index 0ae36f9556c0..a80a24132511 100644 --- a/src/main/java/com/stripe/model/treasury/OutboundTransfer.java +++ b/src/main/java/com/stripe/model/treasury/OutboundTransfer.java @@ -28,7 +28,13 @@ import lombok.Setter; /** - * Use Treasury + * for platforms v2. Use Outbound + * Transfers instead of building a new v1 integration. + * + *

Use OutboundTransfers * to transfer funds from a FinancialAccount to a PaymentMethod diff --git a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java index 2e89b3684548..d7627db1e804 100644 --- a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java +++ b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java @@ -23,7 +23,13 @@ import lombok.Setter; /** - * ReceivedCredits represent funds sent to a Treasury + * for platforms v2. Use Received + * Credits instead of building a new v1 integration. + * + *

ReceivedCredits represent funds sent to a FinancialAccount (for example, via ACH * or wire). These money movements are not initiated from the FinancialAccount. */ @@ -386,7 +392,13 @@ public static class LinkedFlows extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class SourceFlowDetails extends StripeObject { /** - * You can reverse some Treasury for platforms v2. Use Received + * Credits instead of building a new v1 integration. + * + *

You can reverse some ReceivedCredits depending on their * network and source flow. Reversing a ReceivedCredit leads to the creation of a new object * known as a CreditReversal. @@ -395,7 +407,13 @@ public static class SourceFlowDetails extends StripeObject { CreditReversal creditReversal; /** - * Use Treasury for platforms v2. Use Outbound + * Payments instead of building a new v1 integration. + * + *

Use OutboundPayments * to send funds to another party's external bank account or FinancialAccount. To send money @@ -414,7 +432,13 @@ public static class SourceFlowDetails extends StripeObject { OutboundPayment outboundPayment; /** - * Use Treasury for platforms v2. Use Outbound + * Transfers instead of building a new v1 integration. + * + *

Use OutboundTransfers * to transfer funds from a FinancialAccount to a diff --git a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java index 1f141fc5330a..b615855e867f 100644 --- a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java +++ b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java @@ -22,7 +22,13 @@ import lombok.Setter; /** - * ReceivedDebits represent funds pulled from a Treasury + * for platforms v2. Use Received + * Debits instead of building a new v1 integration. + * + *

ReceivedDebits represent funds pulled from a FinancialAccount. These are not * initiated from the FinancialAccount. */ diff --git a/src/main/java/com/stripe/model/treasury/Transaction.java b/src/main/java/com/stripe/model/treasury/Transaction.java index 353d553be249..86780b225ddc 100644 --- a/src/main/java/com/stripe/model/treasury/Transaction.java +++ b/src/main/java/com/stripe/model/treasury/Transaction.java @@ -20,7 +20,13 @@ import lombok.Setter; /** - * Transactions represent changes to a Treasury for + * platforms v2. Use Transactions instead of + * building a new v1 integration. + * + *

Transactions represent changes to a FinancialAccount's balance. */ @Getter @@ -211,7 +217,13 @@ public static class BalanceImpact extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class FlowDetails extends StripeObject { /** - * You can reverse some Treasury for platforms v2. Use Received + * Credits instead of building a new v1 integration. + * + *

You can reverse some ReceivedCredits depending on their * network and source flow. Reversing a ReceivedCredit leads to the creation of a new object * known as a CreditReversal. @@ -220,15 +232,26 @@ public static class FlowDetails extends StripeObject { CreditReversal creditReversal; /** - * You can reverse some ReceivedDebits - * depending on their network and source flow. Reversing a ReceivedDebit leads to the creation - * of a new object known as a DebitReversal. + * Legacy DebitReversals are part of the v1 version of Treasury for platforms and do not support + * many of the features introduced in Treasury for platforms v2. + * + *

You can reverse some ReceivedDebits depending on their + * network and source flow. Reversing a ReceivedDebit leads to the creation of a new object + * known as a DebitReversal. */ @SerializedName("debit_reversal") DebitReversal debitReversal; /** - * Use Treasury for platforms v2. Use Inbound + * Transfers instead of building a new v1 integration. + * + *

Use InboundTransfers * to add funds to your FinancialAccount via a @@ -254,7 +277,13 @@ public static class FlowDetails extends StripeObject { Authorization issuingAuthorization; /** - * Use Treasury for platforms v2. Use Outbound + * Payments instead of building a new v1 integration. + * + *

Use OutboundPayments * to send funds to another party's external bank account or FinancialAccount. To send money to @@ -273,7 +302,13 @@ public static class FlowDetails extends StripeObject { OutboundPayment outboundPayment; /** - * Use Treasury for platforms v2. Use Outbound + * Transfers instead of building a new v1 integration. + * + *

Use OutboundTransfers * to transfer funds from a FinancialAccount to a PaymentMethod @@ -294,7 +329,13 @@ public static class FlowDetails extends StripeObject { OutboundTransfer outboundTransfer; /** - * ReceivedCredits represent funds sent to a Treasury for platforms v2. Use Received + * Credits instead of building a new v1 integration. + * + *

ReceivedCredits represent funds sent to a FinancialAccount (for example, via * ACH or wire). These money movements are not initiated from the FinancialAccount. */ @@ -302,7 +343,13 @@ public static class FlowDetails extends StripeObject { ReceivedCredit receivedCredit; /** - * ReceivedDebits represent funds pulled from a Treasury for platforms v2. Use Received + * Debits instead of building a new v1 integration. + * + *

ReceivedDebits represent funds pulled from a FinancialAccount. These are not * initiated from the FinancialAccount. */ diff --git a/src/main/java/com/stripe/model/treasury/TransactionEntry.java b/src/main/java/com/stripe/model/treasury/TransactionEntry.java index a1db410c0686..4aa798af610a 100644 --- a/src/main/java/com/stripe/model/treasury/TransactionEntry.java +++ b/src/main/java/com/stripe/model/treasury/TransactionEntry.java @@ -21,7 +21,13 @@ import lombok.Setter; /** - * TransactionEntries represent individual units of money movements within a single Treasury + * for platforms v2. Use Transaction + * Entries instead of building a new v1 integration. + * + *

TransactionEntries represent individual units of money movements within a single Transaction. */ @Getter @@ -232,7 +238,13 @@ public static class BalanceImpact extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class FlowDetails extends StripeObject { /** - * You can reverse some Treasury for platforms v2. Use Received + * Credits instead of building a new v1 integration. + * + *

You can reverse some ReceivedCredits depending on their * network and source flow. Reversing a ReceivedCredit leads to the creation of a new object * known as a CreditReversal. @@ -241,15 +253,26 @@ public static class FlowDetails extends StripeObject { CreditReversal creditReversal; /** - * You can reverse some ReceivedDebits - * depending on their network and source flow. Reversing a ReceivedDebit leads to the creation - * of a new object known as a DebitReversal. + * Legacy DebitReversals are part of the v1 version of Treasury for platforms and do not support + * many of the features introduced in Treasury for platforms v2. + * + *

You can reverse some ReceivedDebits depending on their + * network and source flow. Reversing a ReceivedDebit leads to the creation of a new object + * known as a DebitReversal. */ @SerializedName("debit_reversal") DebitReversal debitReversal; /** - * Use Treasury for platforms v2. Use Inbound + * Transfers instead of building a new v1 integration. + * + *

Use InboundTransfers * to add funds to your FinancialAccount via a @@ -275,7 +298,13 @@ public static class FlowDetails extends StripeObject { Authorization issuingAuthorization; /** - * Use Treasury for platforms v2. Use Outbound + * Payments instead of building a new v1 integration. + * + *

Use OutboundPayments * to send funds to another party's external bank account or FinancialAccount. To send money to @@ -294,7 +323,13 @@ public static class FlowDetails extends StripeObject { OutboundPayment outboundPayment; /** - * Use Treasury for platforms v2. Use Outbound + * Transfers instead of building a new v1 integration. + * + *

Use OutboundTransfers * to transfer funds from a FinancialAccount to a PaymentMethod @@ -315,7 +350,13 @@ public static class FlowDetails extends StripeObject { OutboundTransfer outboundTransfer; /** - * ReceivedCredits represent funds sent to a Treasury for platforms v2. Use Received + * Credits instead of building a new v1 integration. + * + *

ReceivedCredits represent funds sent to a FinancialAccount (for example, via * ACH or wire). These money movements are not initiated from the FinancialAccount. */ @@ -323,7 +364,13 @@ public static class FlowDetails extends StripeObject { ReceivedCredit receivedCredit; /** - * ReceivedDebits represent funds pulled from a Treasury for platforms v2. Use Received + * Debits instead of building a new v1 integration. + * + *

ReceivedDebits represent funds pulled from a FinancialAccount. These are not * initiated from the FinancialAccount. */ diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index b486cf9b27e8..22a60d90bb96 100644 --- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java @@ -118,6 +118,52 @@ public final class EventDataClassLookup { classLookup.put("v2.core.event", com.stripe.model.v2.core.Event.class); classLookup.put("v2.core.event_destination", com.stripe.model.v2.core.EventDestination.class); + classLookup.put( + "v2.core.vault.gb_bank_account", com.stripe.model.v2.core.vault.GbBankAccount.class); + classLookup.put( + "v2.core.vault.us_bank_account", com.stripe.model.v2.core.vault.UsBankAccount.class); + + classLookup.put( + "v2.money_management.adjustment", com.stripe.model.v2.moneymanagement.Adjustment.class); + classLookup.put( + "v2.money_management.financial_account", + com.stripe.model.v2.moneymanagement.FinancialAccount.class); + classLookup.put( + "v2.money_management.financial_address", + com.stripe.model.v2.moneymanagement.FinancialAddress.class); + classLookup.put( + "v2.money_management.financial_address_credit_simulation", + com.stripe.model.v2.moneymanagement.FinancialAddressCreditSimulation.class); + classLookup.put( + "v2.money_management.inbound_transfer", + com.stripe.model.v2.moneymanagement.InboundTransfer.class); + classLookup.put( + "v2.money_management.outbound_payment", + com.stripe.model.v2.moneymanagement.OutboundPayment.class); + classLookup.put( + "v2.money_management.outbound_setup_intent", + com.stripe.model.v2.moneymanagement.OutboundSetupIntent.class); + classLookup.put( + "v2.money_management.payout_intent", + com.stripe.model.v2.moneymanagement.PayoutIntent.class); + classLookup.put( + "v2.money_management.payout_method", + com.stripe.model.v2.moneymanagement.PayoutMethod.class); + classLookup.put( + "v2.money_management.payout_methods_bank_account_spec", + com.stripe.model.v2.moneymanagement.PayoutMethodsBankAccountSpec.class); + classLookup.put( + "v2.money_management.received_credit", + com.stripe.model.v2.moneymanagement.ReceivedCredit.class); + classLookup.put( + "v2.money_management.recipient_verification", + com.stripe.model.v2.moneymanagement.RecipientVerification.class); + classLookup.put( + "v2.money_management.transaction", com.stripe.model.v2.moneymanagement.Transaction.class); + classLookup.put( + "v2.money_management.transaction_entry", + com.stripe.model.v2.moneymanagement.TransactionEntry.class); + eventClassLookup.put( "v1.account.application.authorized", com.stripe.events.V1AccountApplicationAuthorizedEvent.class); @@ -242,14 +288,50 @@ public final class EventDataClassLookup { "v1.customer.discount.created", com.stripe.events.V1CustomerDiscountCreatedEvent.class); eventClassLookup.put( "v1.customer.discount.deleted", com.stripe.events.V1CustomerDiscountDeletedEvent.class); + eventClassLookup.put( + "v1.customer.discount.source_changed", + com.stripe.events.V1CustomerDiscountSourceChangedEvent.class); eventClassLookup.put( "v1.customer.discount.updated", com.stripe.events.V1CustomerDiscountUpdatedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.active", + com.stripe.events.V1CustomerSubscriptionActiveEvent.class); + eventClassLookup.put( + "v1.customer.subscription.cancel_at_changed", + com.stripe.events.V1CustomerSubscriptionCancelAtChangedEvent.class); eventClassLookup.put( "v1.customer.subscription.created", com.stripe.events.V1CustomerSubscriptionCreatedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.default_payment_method_changed", + com.stripe.events.V1CustomerSubscriptionDefaultPaymentMethodChangedEvent.class); eventClassLookup.put( "v1.customer.subscription.deleted", com.stripe.events.V1CustomerSubscriptionDeletedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.incomplete", + com.stripe.events.V1CustomerSubscriptionIncompleteEvent.class); + eventClassLookup.put( + "v1.customer.subscription.incomplete_expired", + com.stripe.events.V1CustomerSubscriptionIncompleteExpiredEvent.class); + eventClassLookup.put( + "v1.customer.subscription.item_added", + com.stripe.events.V1CustomerSubscriptionItemAddedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.item_price_changed", + com.stripe.events.V1CustomerSubscriptionItemPriceChangedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.item_quantity_changed", + com.stripe.events.V1CustomerSubscriptionItemQuantityChangedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.item_removed", + com.stripe.events.V1CustomerSubscriptionItemRemovedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.item_tax_rates_changed", + com.stripe.events.V1CustomerSubscriptionItemTaxRatesChangedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.past_due", + com.stripe.events.V1CustomerSubscriptionPastDueEvent.class); eventClassLookup.put( "v1.customer.subscription.paused", com.stripe.events.V1CustomerSubscriptionPausedEvent.class); @@ -265,6 +347,12 @@ public final class EventDataClassLookup { eventClassLookup.put( "v1.customer.subscription.trial_will_end", com.stripe.events.V1CustomerSubscriptionTrialWillEndEvent.class); + eventClassLookup.put( + "v1.customer.subscription.trialing", + com.stripe.events.V1CustomerSubscriptionTrialingEvent.class); + eventClassLookup.put( + "v1.customer.subscription.unpaid", + com.stripe.events.V1CustomerSubscriptionUnpaidEvent.class); eventClassLookup.put( "v1.customer.subscription.updated", com.stripe.events.V1CustomerSubscriptionUpdatedEvent.class); @@ -278,6 +366,12 @@ public final class EventDataClassLookup { eventClassLookup.put( "v1.customer_cash_balance_transaction.created", com.stripe.events.V1CustomerCashBalanceTransactionCreatedEvent.class); + eventClassLookup.put( + "v1.entitlements.active_entitlement_summary.entitlement_added", + com.stripe.events.V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent.class); + eventClassLookup.put( + "v1.entitlements.active_entitlement_summary.entitlement_removed", + com.stripe.events.V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent.class); eventClassLookup.put( "v1.entitlements.active_entitlement_summary.updated", com.stripe.events.V1EntitlementsActiveEntitlementSummaryUpdatedEvent.class); @@ -285,6 +379,12 @@ public final class EventDataClassLookup { eventClassLookup.put( "v1.financial_connections.account.account_numbers_updated", com.stripe.events.V1FinancialConnectionsAccountAccountNumbersUpdatedEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.balance_refresh_failed", + com.stripe.events.V1FinancialConnectionsAccountBalanceRefreshFailedEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.balance_refresh_succeeded", + com.stripe.events.V1FinancialConnectionsAccountBalanceRefreshSucceededEvent.class); eventClassLookup.put( "v1.financial_connections.account.created", com.stripe.events.V1FinancialConnectionsAccountCreatedEvent.class); @@ -297,6 +397,18 @@ public final class EventDataClassLookup { eventClassLookup.put( "v1.financial_connections.account.expected_deactivation_date_updated", com.stripe.events.V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.inferred_balances_refresh_failed", + com.stripe.events.V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.inferred_balances_refresh_succeeded", + com.stripe.events.V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.ownership_refresh_failed", + com.stripe.events.V1FinancialConnectionsAccountOwnershipRefreshFailedEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.ownership_refresh_succeeded", + com.stripe.events.V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent.class); eventClassLookup.put( "v1.financial_connections.account.reactivated", com.stripe.events.V1FinancialConnectionsAccountReactivatedEvent.class); @@ -309,10 +421,22 @@ public final class EventDataClassLookup { eventClassLookup.put( "v1.financial_connections.account.refreshed_transactions", com.stripe.events.V1FinancialConnectionsAccountRefreshedTransactionsEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.risk_intelligence_refresh_failed", + com.stripe.events.V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.risk_intelligence_refresh_succeeded", + com.stripe.events.V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent.class); eventClassLookup.put( "v1.financial_connections.account.supported_payment_method_types_updated", com.stripe.events.V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent .class); + eventClassLookup.put( + "v1.financial_connections.account.transactions_refresh_failed", + com.stripe.events.V1FinancialConnectionsAccountTransactionsRefreshFailedEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.transactions_refresh_succeeded", + com.stripe.events.V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent.class); eventClassLookup.put( "v1.financial_connections.account.upcoming_account_number_expiry", com.stripe.events.V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent.class); @@ -339,9 +463,23 @@ public final class EventDataClassLookup { com.stripe.events.V1IdentityVerificationSessionVerifiedEvent.class); eventClassLookup.put("v1.invoice.created", com.stripe.events.V1InvoiceCreatedEvent.class); eventClassLookup.put("v1.invoice.deleted", com.stripe.events.V1InvoiceDeletedEvent.class); + eventClassLookup.put( + "v1.invoice.discount_added", com.stripe.events.V1InvoiceDiscountAddedEvent.class); + eventClassLookup.put( + "v1.invoice.discount_removed", com.stripe.events.V1InvoiceDiscountRemovedEvent.class); eventClassLookup.put( "v1.invoice.finalization_failed", com.stripe.events.V1InvoiceFinalizationFailedEvent.class); eventClassLookup.put("v1.invoice.finalized", com.stripe.events.V1InvoiceFinalizedEvent.class); + eventClassLookup.put( + "v1.invoice.line_item_added", com.stripe.events.V1InvoiceLineItemAddedEvent.class); + eventClassLookup.put( + "v1.invoice.line_item_pricing_changed", + com.stripe.events.V1InvoiceLineItemPricingChangedEvent.class); + eventClassLookup.put( + "v1.invoice.line_item_quantity_changed", + com.stripe.events.V1InvoiceLineItemQuantityChangedEvent.class); + eventClassLookup.put( + "v1.invoice.line_item_removed", com.stripe.events.V1InvoiceLineItemRemovedEvent.class); eventClassLookup.put( "v1.invoice.marked_uncollectible", com.stripe.events.V1InvoiceMarkedUncollectibleEvent.class); @@ -363,12 +501,23 @@ public final class EventDataClassLookup { eventClassLookup.put("v1.invoice.updated", com.stripe.events.V1InvoiceUpdatedEvent.class); eventClassLookup.put("v1.invoice.voided", com.stripe.events.V1InvoiceVoidedEvent.class); eventClassLookup.put("v1.invoice.will_be_due", com.stripe.events.V1InvoiceWillBeDueEvent.class); + eventClassLookup.put( + "v1.invoice_payment.canceled", com.stripe.events.V1InvoicePaymentCanceledEvent.class); + eventClassLookup.put( + "v1.invoice_payment.open", com.stripe.events.V1InvoicePaymentOpenEvent.class); eventClassLookup.put( "v1.invoice_payment.paid", com.stripe.events.V1InvoicePaymentPaidEvent.class); + eventClassLookup.put( + "v1.invoiceitem.amount_changed", com.stripe.events.V1InvoiceitemAmountChangedEvent.class); eventClassLookup.put( "v1.invoiceitem.created", com.stripe.events.V1InvoiceitemCreatedEvent.class); eventClassLookup.put( "v1.invoiceitem.deleted", com.stripe.events.V1InvoiceitemDeletedEvent.class); + eventClassLookup.put( + "v1.invoiceitem.discount_added", com.stripe.events.V1InvoiceitemDiscountAddedEvent.class); + eventClassLookup.put( + "v1.invoiceitem.discount_removed", + com.stripe.events.V1InvoiceitemDiscountRemovedEvent.class); eventClassLookup.put( "v1.issuing_authorization.created", com.stripe.events.V1IssuingAuthorizationCreatedEvent.class); @@ -471,14 +620,31 @@ public final class EventDataClassLookup { eventClassLookup.put("v1.plan.created", com.stripe.events.V1PlanCreatedEvent.class); eventClassLookup.put("v1.plan.deleted", com.stripe.events.V1PlanDeletedEvent.class); eventClassLookup.put("v1.plan.updated", com.stripe.events.V1PlanUpdatedEvent.class); + eventClassLookup.put("v1.price.activated", com.stripe.events.V1PriceActivatedEvent.class); eventClassLookup.put("v1.price.created", com.stripe.events.V1PriceCreatedEvent.class); + eventClassLookup.put("v1.price.deactivated", com.stripe.events.V1PriceDeactivatedEvent.class); eventClassLookup.put("v1.price.deleted", com.stripe.events.V1PriceDeletedEvent.class); + eventClassLookup.put( + "v1.price.lookup_key_changed", com.stripe.events.V1PriceLookupKeyChangedEvent.class); + eventClassLookup.put( + "v1.price.tax_behavior_changed", com.stripe.events.V1PriceTaxBehaviorChangedEvent.class); eventClassLookup.put("v1.price.updated", com.stripe.events.V1PriceUpdatedEvent.class); + eventClassLookup.put("v1.product.activated", com.stripe.events.V1ProductActivatedEvent.class); eventClassLookup.put("v1.product.created", com.stripe.events.V1ProductCreatedEvent.class); + eventClassLookup.put( + "v1.product.deactivated", com.stripe.events.V1ProductDeactivatedEvent.class); + eventClassLookup.put( + "v1.product.default_price_changed", + com.stripe.events.V1ProductDefaultPriceChangedEvent.class); eventClassLookup.put("v1.product.deleted", com.stripe.events.V1ProductDeletedEvent.class); + eventClassLookup.put( + "v1.product.tax_code_changed", com.stripe.events.V1ProductTaxCodeChangedEvent.class); eventClassLookup.put("v1.product.updated", com.stripe.events.V1ProductUpdatedEvent.class); eventClassLookup.put( "v1.promotion_code.created", com.stripe.events.V1PromotionCodeCreatedEvent.class); + eventClassLookup.put( + "v1.promotion_code.fully_redeemed", + com.stripe.events.V1PromotionCodeFullyRedeemedEvent.class); eventClassLookup.put( "v1.promotion_code.updated", com.stripe.events.V1PromotionCodeUpdatedEvent.class); eventClassLookup.put("v1.quote.accepted", com.stripe.events.V1QuoteAcceptedEvent.class); @@ -531,6 +697,21 @@ public final class EventDataClassLookup { eventClassLookup.put( "v1.subscription_schedule.expiring", com.stripe.events.V1SubscriptionScheduleExpiringEvent.class); + eventClassLookup.put( + "v1.subscription_schedule.phase_added", + com.stripe.events.V1SubscriptionSchedulePhaseAddedEvent.class); + eventClassLookup.put( + "v1.subscription_schedule.phase_default_tax_rates_changed", + com.stripe.events.V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent.class); + eventClassLookup.put( + "v1.subscription_schedule.phase_end_date_changed", + com.stripe.events.V1SubscriptionSchedulePhaseEndDateChangedEvent.class); + eventClassLookup.put( + "v1.subscription_schedule.phase_removed", + com.stripe.events.V1SubscriptionSchedulePhaseRemovedEvent.class); + eventClassLookup.put( + "v1.subscription_schedule.phase_trial_end_changed", + com.stripe.events.V1SubscriptionSchedulePhaseTrialEndChangedEvent.class); eventClassLookup.put( "v1.subscription_schedule.released", com.stripe.events.V1SubscriptionScheduleReleasedEvent.class); @@ -634,5 +815,110 @@ public final class EventDataClassLookup { "v2.core.account_person.updated", com.stripe.events.V2CoreAccountPersonUpdatedEvent.class); eventClassLookup.put( "v2.core.event_destination.ping", com.stripe.events.V2CoreEventDestinationPingEvent.class); + eventClassLookup.put( + "v2.money_management.adjustment.created", + com.stripe.events.V2MoneyManagementAdjustmentCreatedEvent.class); + eventClassLookup.put( + "v2.money_management.financial_account.created", + com.stripe.events.V2MoneyManagementFinancialAccountCreatedEvent.class); + eventClassLookup.put( + "v2.money_management.financial_account.updated", + com.stripe.events.V2MoneyManagementFinancialAccountUpdatedEvent.class); + eventClassLookup.put( + "v2.money_management.financial_address.activated", + com.stripe.events.V2MoneyManagementFinancialAddressActivatedEvent.class); + eventClassLookup.put( + "v2.money_management.financial_address.failed", + com.stripe.events.V2MoneyManagementFinancialAddressFailedEvent.class); + eventClassLookup.put( + "v2.money_management.inbound_transfer.available", + com.stripe.events.V2MoneyManagementInboundTransferAvailableEvent.class); + eventClassLookup.put( + "v2.money_management.inbound_transfer.bank_debit_failed", + com.stripe.events.V2MoneyManagementInboundTransferBankDebitFailedEvent.class); + eventClassLookup.put( + "v2.money_management.inbound_transfer.bank_debit_processing", + com.stripe.events.V2MoneyManagementInboundTransferBankDebitProcessingEvent.class); + eventClassLookup.put( + "v2.money_management.inbound_transfer.bank_debit_queued", + com.stripe.events.V2MoneyManagementInboundTransferBankDebitQueuedEvent.class); + eventClassLookup.put( + "v2.money_management.inbound_transfer.bank_debit_returned", + com.stripe.events.V2MoneyManagementInboundTransferBankDebitReturnedEvent.class); + eventClassLookup.put( + "v2.money_management.inbound_transfer.bank_debit_succeeded", + com.stripe.events.V2MoneyManagementInboundTransferBankDebitSucceededEvent.class); + eventClassLookup.put( + "v2.money_management.outbound_payment.canceled", + com.stripe.events.V2MoneyManagementOutboundPaymentCanceledEvent.class); + eventClassLookup.put( + "v2.money_management.outbound_payment.created", + com.stripe.events.V2MoneyManagementOutboundPaymentCreatedEvent.class); + eventClassLookup.put( + "v2.money_management.outbound_payment.failed", + com.stripe.events.V2MoneyManagementOutboundPaymentFailedEvent.class); + eventClassLookup.put( + "v2.money_management.outbound_payment.posted", + com.stripe.events.V2MoneyManagementOutboundPaymentPostedEvent.class); + eventClassLookup.put( + "v2.money_management.outbound_payment.returned", + com.stripe.events.V2MoneyManagementOutboundPaymentReturnedEvent.class); + eventClassLookup.put( + "v2.money_management.outbound_payment.under_review", + com.stripe.events.V2MoneyManagementOutboundPaymentUnderReviewEvent.class); + eventClassLookup.put( + "v2.money_management.outbound_payment.updated", + com.stripe.events.V2MoneyManagementOutboundPaymentUpdatedEvent.class); + eventClassLookup.put( + "v2.money_management.payout_intent.canceled", + com.stripe.events.V2MoneyManagementPayoutIntentCanceledEvent.class); + eventClassLookup.put( + "v2.money_management.payout_intent.created", + com.stripe.events.V2MoneyManagementPayoutIntentCreatedEvent.class); + eventClassLookup.put( + "v2.money_management.payout_intent.pending", + com.stripe.events.V2MoneyManagementPayoutIntentPendingEvent.class); + eventClassLookup.put( + "v2.money_management.payout_intent.posted", + com.stripe.events.V2MoneyManagementPayoutIntentPostedEvent.class); + eventClassLookup.put( + "v2.money_management.payout_intent.processing", + com.stripe.events.V2MoneyManagementPayoutIntentProcessingEvent.class); + eventClassLookup.put( + "v2.money_management.payout_intent.requires_action", + com.stripe.events.V2MoneyManagementPayoutIntentRequiresActionEvent.class); + eventClassLookup.put( + "v2.money_management.payout_intent.updated", + com.stripe.events.V2MoneyManagementPayoutIntentUpdatedEvent.class); + eventClassLookup.put( + "v2.money_management.payout_method.created", + com.stripe.events.V2MoneyManagementPayoutMethodCreatedEvent.class); + eventClassLookup.put( + "v2.money_management.payout_method.updated", + com.stripe.events.V2MoneyManagementPayoutMethodUpdatedEvent.class); + eventClassLookup.put( + "v2.money_management.received_credit.available", + com.stripe.events.V2MoneyManagementReceivedCreditAvailableEvent.class); + eventClassLookup.put( + "v2.money_management.received_credit.failed", + com.stripe.events.V2MoneyManagementReceivedCreditFailedEvent.class); + eventClassLookup.put( + "v2.money_management.received_credit.returned", + com.stripe.events.V2MoneyManagementReceivedCreditReturnedEvent.class); + eventClassLookup.put( + "v2.money_management.received_credit.succeeded", + com.stripe.events.V2MoneyManagementReceivedCreditSucceededEvent.class); + eventClassLookup.put( + "v2.money_management.recipient_verification.created", + com.stripe.events.V2MoneyManagementRecipientVerificationCreatedEvent.class); + eventClassLookup.put( + "v2.money_management.recipient_verification.updated", + com.stripe.events.V2MoneyManagementRecipientVerificationUpdatedEvent.class); + eventClassLookup.put( + "v2.money_management.transaction.created", + com.stripe.events.V2MoneyManagementTransactionCreatedEvent.class); + eventClassLookup.put( + "v2.money_management.transaction.updated", + com.stripe.events.V2MoneyManagementTransactionUpdatedEvent.class); } } diff --git a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java index 534c3091c596..665742631e53 100644 --- a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java @@ -172,15 +172,51 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v1.customer.discount.deleted", com.stripe.events.V1CustomerDiscountDeletedEventNotification.class); + eventClassLookup.put( + "v1.customer.discount.source_changed", + com.stripe.events.V1CustomerDiscountSourceChangedEventNotification.class); eventClassLookup.put( "v1.customer.discount.updated", com.stripe.events.V1CustomerDiscountUpdatedEventNotification.class); + eventClassLookup.put( + "v1.customer.subscription.active", + com.stripe.events.V1CustomerSubscriptionActiveEventNotification.class); + eventClassLookup.put( + "v1.customer.subscription.cancel_at_changed", + com.stripe.events.V1CustomerSubscriptionCancelAtChangedEventNotification.class); eventClassLookup.put( "v1.customer.subscription.created", com.stripe.events.V1CustomerSubscriptionCreatedEventNotification.class); + eventClassLookup.put( + "v1.customer.subscription.default_payment_method_changed", + com.stripe.events.V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification.class); eventClassLookup.put( "v1.customer.subscription.deleted", com.stripe.events.V1CustomerSubscriptionDeletedEventNotification.class); + eventClassLookup.put( + "v1.customer.subscription.incomplete", + com.stripe.events.V1CustomerSubscriptionIncompleteEventNotification.class); + eventClassLookup.put( + "v1.customer.subscription.incomplete_expired", + com.stripe.events.V1CustomerSubscriptionIncompleteExpiredEventNotification.class); + eventClassLookup.put( + "v1.customer.subscription.item_added", + com.stripe.events.V1CustomerSubscriptionItemAddedEventNotification.class); + eventClassLookup.put( + "v1.customer.subscription.item_price_changed", + com.stripe.events.V1CustomerSubscriptionItemPriceChangedEventNotification.class); + eventClassLookup.put( + "v1.customer.subscription.item_quantity_changed", + com.stripe.events.V1CustomerSubscriptionItemQuantityChangedEventNotification.class); + eventClassLookup.put( + "v1.customer.subscription.item_removed", + com.stripe.events.V1CustomerSubscriptionItemRemovedEventNotification.class); + eventClassLookup.put( + "v1.customer.subscription.item_tax_rates_changed", + com.stripe.events.V1CustomerSubscriptionItemTaxRatesChangedEventNotification.class); + eventClassLookup.put( + "v1.customer.subscription.past_due", + com.stripe.events.V1CustomerSubscriptionPastDueEventNotification.class); eventClassLookup.put( "v1.customer.subscription.paused", com.stripe.events.V1CustomerSubscriptionPausedEventNotification.class); @@ -196,6 +232,12 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v1.customer.subscription.trial_will_end", com.stripe.events.V1CustomerSubscriptionTrialWillEndEventNotification.class); + eventClassLookup.put( + "v1.customer.subscription.trialing", + com.stripe.events.V1CustomerSubscriptionTrialingEventNotification.class); + eventClassLookup.put( + "v1.customer.subscription.unpaid", + com.stripe.events.V1CustomerSubscriptionUnpaidEventNotification.class); eventClassLookup.put( "v1.customer.subscription.updated", com.stripe.events.V1CustomerSubscriptionUpdatedEventNotification.class); @@ -213,6 +255,14 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v1.customer_cash_balance_transaction.created", com.stripe.events.V1CustomerCashBalanceTransactionCreatedEventNotification.class); + eventClassLookup.put( + "v1.entitlements.active_entitlement_summary.entitlement_added", + com.stripe.events.V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification + .class); + eventClassLookup.put( + "v1.entitlements.active_entitlement_summary.entitlement_removed", + com.stripe.events.V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification + .class); eventClassLookup.put( "v1.entitlements.active_entitlement_summary.updated", com.stripe.events.V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification.class); @@ -221,6 +271,13 @@ public final class EventNotificationClassLookup { "v1.financial_connections.account.account_numbers_updated", com.stripe.events.V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification .class); + eventClassLookup.put( + "v1.financial_connections.account.balance_refresh_failed", + com.stripe.events.V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification.class); + eventClassLookup.put( + "v1.financial_connections.account.balance_refresh_succeeded", + com.stripe.events.V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification + .class); eventClassLookup.put( "v1.financial_connections.account.created", com.stripe.events.V1FinancialConnectionsAccountCreatedEventNotification.class); @@ -234,6 +291,22 @@ public final class EventNotificationClassLookup { "v1.financial_connections.account.expected_deactivation_date_updated", com.stripe.events .V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification.class); + eventClassLookup.put( + "v1.financial_connections.account.inferred_balances_refresh_failed", + com.stripe.events + .V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification.class); + eventClassLookup.put( + "v1.financial_connections.account.inferred_balances_refresh_succeeded", + com.stripe.events + .V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification.class); + eventClassLookup.put( + "v1.financial_connections.account.ownership_refresh_failed", + com.stripe.events.V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification + .class); + eventClassLookup.put( + "v1.financial_connections.account.ownership_refresh_succeeded", + com.stripe.events.V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification + .class); eventClassLookup.put( "v1.financial_connections.account.reactivated", com.stripe.events.V1FinancialConnectionsAccountReactivatedEventNotification.class); @@ -247,11 +320,27 @@ public final class EventNotificationClassLookup { "v1.financial_connections.account.refreshed_transactions", com.stripe.events.V1FinancialConnectionsAccountRefreshedTransactionsEventNotification .class); + eventClassLookup.put( + "v1.financial_connections.account.risk_intelligence_refresh_failed", + com.stripe.events + .V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification.class); + eventClassLookup.put( + "v1.financial_connections.account.risk_intelligence_refresh_succeeded", + com.stripe.events + .V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification.class); eventClassLookup.put( "v1.financial_connections.account.supported_payment_method_types_updated", com.stripe.events .V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification .class); + eventClassLookup.put( + "v1.financial_connections.account.transactions_refresh_failed", + com.stripe.events.V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification + .class); + eventClassLookup.put( + "v1.financial_connections.account.transactions_refresh_succeeded", + com.stripe.events.V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification + .class); eventClassLookup.put( "v1.financial_connections.account.upcoming_account_number_expiry", com.stripe.events.V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification @@ -281,11 +370,29 @@ public final class EventNotificationClassLookup { "v1.invoice.created", com.stripe.events.V1InvoiceCreatedEventNotification.class); eventClassLookup.put( "v1.invoice.deleted", com.stripe.events.V1InvoiceDeletedEventNotification.class); + eventClassLookup.put( + "v1.invoice.discount_added", + com.stripe.events.V1InvoiceDiscountAddedEventNotification.class); + eventClassLookup.put( + "v1.invoice.discount_removed", + com.stripe.events.V1InvoiceDiscountRemovedEventNotification.class); eventClassLookup.put( "v1.invoice.finalization_failed", com.stripe.events.V1InvoiceFinalizationFailedEventNotification.class); eventClassLookup.put( "v1.invoice.finalized", com.stripe.events.V1InvoiceFinalizedEventNotification.class); + eventClassLookup.put( + "v1.invoice.line_item_added", + com.stripe.events.V1InvoiceLineItemAddedEventNotification.class); + eventClassLookup.put( + "v1.invoice.line_item_pricing_changed", + com.stripe.events.V1InvoiceLineItemPricingChangedEventNotification.class); + eventClassLookup.put( + "v1.invoice.line_item_quantity_changed", + com.stripe.events.V1InvoiceLineItemQuantityChangedEventNotification.class); + eventClassLookup.put( + "v1.invoice.line_item_removed", + com.stripe.events.V1InvoiceLineItemRemovedEventNotification.class); eventClassLookup.put( "v1.invoice.marked_uncollectible", com.stripe.events.V1InvoiceMarkedUncollectibleEventNotification.class); @@ -315,12 +422,26 @@ public final class EventNotificationClassLookup { "v1.invoice.voided", com.stripe.events.V1InvoiceVoidedEventNotification.class); eventClassLookup.put( "v1.invoice.will_be_due", com.stripe.events.V1InvoiceWillBeDueEventNotification.class); + eventClassLookup.put( + "v1.invoice_payment.canceled", + com.stripe.events.V1InvoicePaymentCanceledEventNotification.class); + eventClassLookup.put( + "v1.invoice_payment.open", com.stripe.events.V1InvoicePaymentOpenEventNotification.class); eventClassLookup.put( "v1.invoice_payment.paid", com.stripe.events.V1InvoicePaymentPaidEventNotification.class); + eventClassLookup.put( + "v1.invoiceitem.amount_changed", + com.stripe.events.V1InvoiceitemAmountChangedEventNotification.class); eventClassLookup.put( "v1.invoiceitem.created", com.stripe.events.V1InvoiceitemCreatedEventNotification.class); eventClassLookup.put( "v1.invoiceitem.deleted", com.stripe.events.V1InvoiceitemDeletedEventNotification.class); + eventClassLookup.put( + "v1.invoiceitem.discount_added", + com.stripe.events.V1InvoiceitemDiscountAddedEventNotification.class); + eventClassLookup.put( + "v1.invoiceitem.discount_removed", + com.stripe.events.V1InvoiceitemDiscountRemovedEventNotification.class); eventClassLookup.put( "v1.issuing_authorization.created", com.stripe.events.V1IssuingAuthorizationCreatedEventNotification.class); @@ -446,21 +567,44 @@ public final class EventNotificationClassLookup { eventClassLookup.put("v1.plan.created", com.stripe.events.V1PlanCreatedEventNotification.class); eventClassLookup.put("v1.plan.deleted", com.stripe.events.V1PlanDeletedEventNotification.class); eventClassLookup.put("v1.plan.updated", com.stripe.events.V1PlanUpdatedEventNotification.class); + eventClassLookup.put( + "v1.price.activated", com.stripe.events.V1PriceActivatedEventNotification.class); eventClassLookup.put( "v1.price.created", com.stripe.events.V1PriceCreatedEventNotification.class); + eventClassLookup.put( + "v1.price.deactivated", com.stripe.events.V1PriceDeactivatedEventNotification.class); eventClassLookup.put( "v1.price.deleted", com.stripe.events.V1PriceDeletedEventNotification.class); + eventClassLookup.put( + "v1.price.lookup_key_changed", + com.stripe.events.V1PriceLookupKeyChangedEventNotification.class); + eventClassLookup.put( + "v1.price.tax_behavior_changed", + com.stripe.events.V1PriceTaxBehaviorChangedEventNotification.class); eventClassLookup.put( "v1.price.updated", com.stripe.events.V1PriceUpdatedEventNotification.class); + eventClassLookup.put( + "v1.product.activated", com.stripe.events.V1ProductActivatedEventNotification.class); eventClassLookup.put( "v1.product.created", com.stripe.events.V1ProductCreatedEventNotification.class); + eventClassLookup.put( + "v1.product.deactivated", com.stripe.events.V1ProductDeactivatedEventNotification.class); + eventClassLookup.put( + "v1.product.default_price_changed", + com.stripe.events.V1ProductDefaultPriceChangedEventNotification.class); eventClassLookup.put( "v1.product.deleted", com.stripe.events.V1ProductDeletedEventNotification.class); + eventClassLookup.put( + "v1.product.tax_code_changed", + com.stripe.events.V1ProductTaxCodeChangedEventNotification.class); eventClassLookup.put( "v1.product.updated", com.stripe.events.V1ProductUpdatedEventNotification.class); eventClassLookup.put( "v1.promotion_code.created", com.stripe.events.V1PromotionCodeCreatedEventNotification.class); + eventClassLookup.put( + "v1.promotion_code.fully_redeemed", + com.stripe.events.V1PromotionCodeFullyRedeemedEventNotification.class); eventClassLookup.put( "v1.promotion_code.updated", com.stripe.events.V1PromotionCodeUpdatedEventNotification.class); @@ -528,6 +672,21 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v1.subscription_schedule.expiring", com.stripe.events.V1SubscriptionScheduleExpiringEventNotification.class); + eventClassLookup.put( + "v1.subscription_schedule.phase_added", + com.stripe.events.V1SubscriptionSchedulePhaseAddedEventNotification.class); + eventClassLookup.put( + "v1.subscription_schedule.phase_default_tax_rates_changed", + com.stripe.events.V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification.class); + eventClassLookup.put( + "v1.subscription_schedule.phase_end_date_changed", + com.stripe.events.V1SubscriptionSchedulePhaseEndDateChangedEventNotification.class); + eventClassLookup.put( + "v1.subscription_schedule.phase_removed", + com.stripe.events.V1SubscriptionSchedulePhaseRemovedEventNotification.class); + eventClassLookup.put( + "v1.subscription_schedule.phase_trial_end_changed", + com.stripe.events.V1SubscriptionSchedulePhaseTrialEndChangedEventNotification.class); eventClassLookup.put( "v1.subscription_schedule.released", com.stripe.events.V1SubscriptionScheduleReleasedEventNotification.class); @@ -652,5 +811,112 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v2.core.event_destination.ping", com.stripe.events.V2CoreEventDestinationPingEventNotification.class); + eventClassLookup.put( + "v2.money_management.adjustment.created", + com.stripe.events.V2MoneyManagementAdjustmentCreatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.financial_account.created", + com.stripe.events.V2MoneyManagementFinancialAccountCreatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.financial_account.updated", + com.stripe.events.V2MoneyManagementFinancialAccountUpdatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.financial_address.activated", + com.stripe.events.V2MoneyManagementFinancialAddressActivatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.financial_address.failed", + com.stripe.events.V2MoneyManagementFinancialAddressFailedEventNotification.class); + eventClassLookup.put( + "v2.money_management.inbound_transfer.available", + com.stripe.events.V2MoneyManagementInboundTransferAvailableEventNotification.class); + eventClassLookup.put( + "v2.money_management.inbound_transfer.bank_debit_failed", + com.stripe.events.V2MoneyManagementInboundTransferBankDebitFailedEventNotification.class); + eventClassLookup.put( + "v2.money_management.inbound_transfer.bank_debit_processing", + com.stripe.events.V2MoneyManagementInboundTransferBankDebitProcessingEventNotification + .class); + eventClassLookup.put( + "v2.money_management.inbound_transfer.bank_debit_queued", + com.stripe.events.V2MoneyManagementInboundTransferBankDebitQueuedEventNotification.class); + eventClassLookup.put( + "v2.money_management.inbound_transfer.bank_debit_returned", + com.stripe.events.V2MoneyManagementInboundTransferBankDebitReturnedEventNotification.class); + eventClassLookup.put( + "v2.money_management.inbound_transfer.bank_debit_succeeded", + com.stripe.events.V2MoneyManagementInboundTransferBankDebitSucceededEventNotification + .class); + eventClassLookup.put( + "v2.money_management.outbound_payment.canceled", + com.stripe.events.V2MoneyManagementOutboundPaymentCanceledEventNotification.class); + eventClassLookup.put( + "v2.money_management.outbound_payment.created", + com.stripe.events.V2MoneyManagementOutboundPaymentCreatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.outbound_payment.failed", + com.stripe.events.V2MoneyManagementOutboundPaymentFailedEventNotification.class); + eventClassLookup.put( + "v2.money_management.outbound_payment.posted", + com.stripe.events.V2MoneyManagementOutboundPaymentPostedEventNotification.class); + eventClassLookup.put( + "v2.money_management.outbound_payment.returned", + com.stripe.events.V2MoneyManagementOutboundPaymentReturnedEventNotification.class); + eventClassLookup.put( + "v2.money_management.outbound_payment.under_review", + com.stripe.events.V2MoneyManagementOutboundPaymentUnderReviewEventNotification.class); + eventClassLookup.put( + "v2.money_management.outbound_payment.updated", + com.stripe.events.V2MoneyManagementOutboundPaymentUpdatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.payout_intent.canceled", + com.stripe.events.V2MoneyManagementPayoutIntentCanceledEventNotification.class); + eventClassLookup.put( + "v2.money_management.payout_intent.created", + com.stripe.events.V2MoneyManagementPayoutIntentCreatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.payout_intent.pending", + com.stripe.events.V2MoneyManagementPayoutIntentPendingEventNotification.class); + eventClassLookup.put( + "v2.money_management.payout_intent.posted", + com.stripe.events.V2MoneyManagementPayoutIntentPostedEventNotification.class); + eventClassLookup.put( + "v2.money_management.payout_intent.processing", + com.stripe.events.V2MoneyManagementPayoutIntentProcessingEventNotification.class); + eventClassLookup.put( + "v2.money_management.payout_intent.requires_action", + com.stripe.events.V2MoneyManagementPayoutIntentRequiresActionEventNotification.class); + eventClassLookup.put( + "v2.money_management.payout_intent.updated", + com.stripe.events.V2MoneyManagementPayoutIntentUpdatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.payout_method.created", + com.stripe.events.V2MoneyManagementPayoutMethodCreatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.payout_method.updated", + com.stripe.events.V2MoneyManagementPayoutMethodUpdatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.received_credit.available", + com.stripe.events.V2MoneyManagementReceivedCreditAvailableEventNotification.class); + eventClassLookup.put( + "v2.money_management.received_credit.failed", + com.stripe.events.V2MoneyManagementReceivedCreditFailedEventNotification.class); + eventClassLookup.put( + "v2.money_management.received_credit.returned", + com.stripe.events.V2MoneyManagementReceivedCreditReturnedEventNotification.class); + eventClassLookup.put( + "v2.money_management.received_credit.succeeded", + com.stripe.events.V2MoneyManagementReceivedCreditSucceededEventNotification.class); + eventClassLookup.put( + "v2.money_management.recipient_verification.created", + com.stripe.events.V2MoneyManagementRecipientVerificationCreatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.recipient_verification.updated", + com.stripe.events.V2MoneyManagementRecipientVerificationUpdatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.transaction.created", + com.stripe.events.V2MoneyManagementTransactionCreatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.transaction.updated", + com.stripe.events.V2MoneyManagementTransactionUpdatedEventNotification.class); } } 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 a29a3371e4ab..7e081248cfa0 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -564,16 +564,16 @@ public static class BacsDebitPayments extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Branding extends StripeObject { /** - * ID of a file upload: - * An icon for the merchant. Must be square and at least 128px x 128px. + * ID of a file upload: An icon for + * the merchant. Must be square and at least 128px x 128px. */ @SerializedName("icon") String icon; /** - * ID of a file upload: - * A logo for the merchant that will be used in Checkout instead of the icon and without the - * merchant's name next to it if provided. Must be at least 128px x 128px. + * ID of a file upload: A logo for + * the merchant that will be used in Checkout instead of the icon and without the merchant's + * name next to it if provided. Must be at least 128px x 128px. */ @SerializedName("logo") String logo; @@ -3781,10 +3781,531 @@ public static class Recipient extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Capabilities extends StripeObject { + /** Capabilities that enable OutboundPayments to a bank account linked to this Account. */ + @SerializedName("bank_accounts") + BankAccounts bankAccounts; + + /** Enables this Account to receive OutboundPayments to a linked debit card. */ + @SerializedName("cards") + Cards cards; + /** Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). */ @SerializedName("stripe_balance") StripeBalance stripeBalance; + /** Capabilities that enable OutboundPayments to a bank account linked to this Account. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankAccounts extends StripeObject { + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over ACH + * rails. + */ + @SerializedName("ach") + Ach ach; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over Fedwire + * or CHIPS. + */ + @SerializedName("fedwire") + Fedwire fedwire; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over FPS + * rails. + */ + @SerializedName("fps") + Fps fps; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over local + * networks. + */ + @SerializedName("local") + Local local; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over RTP + * rails. + */ + @SerializedName("rtp") + Rtp rtp; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over SEPA + * rails. + */ + @SerializedName("sepa") + Sepa sepa; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over SWIFT. + */ + @SerializedName("swift") + Swift swift; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over ACH + * rails. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Ach extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code rejected}, {@code restricted}, or + * {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code rejected_fraud}, {@code + * rejected_incomplete_verification}, {@code rejected_listed}, {@code rejected_other}, + * {@code rejected_platform_fraud}, {@code rejected_platform_other}, {@code + * rejected_platform_terms_of_service}, {@code rejected_terms_of_service}, {@code + * requirements_past_due}, {@code requirements_pending_verification}, {@code + * restricted_other}, {@code unsupported_business}, {@code unsupported_country}, or + * {@code unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over Fedwire + * or CHIPS. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Fedwire extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code rejected}, {@code restricted}, or + * {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code rejected_fraud}, {@code + * rejected_incomplete_verification}, {@code rejected_listed}, {@code rejected_other}, + * {@code rejected_platform_fraud}, {@code rejected_platform_other}, {@code + * rejected_platform_terms_of_service}, {@code rejected_terms_of_service}, {@code + * requirements_past_due}, {@code requirements_pending_verification}, {@code + * restricted_other}, {@code unsupported_business}, {@code unsupported_country}, or + * {@code unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over FPS + * rails. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Fps extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code rejected}, {@code restricted}, or + * {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code rejected_fraud}, {@code + * rejected_incomplete_verification}, {@code rejected_listed}, {@code rejected_other}, + * {@code rejected_platform_fraud}, {@code rejected_platform_other}, {@code + * rejected_platform_terms_of_service}, {@code rejected_terms_of_service}, {@code + * requirements_past_due}, {@code requirements_pending_verification}, {@code + * restricted_other}, {@code unsupported_business}, {@code unsupported_country}, or + * {@code unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over local + * networks. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Local extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code rejected}, {@code restricted}, or + * {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code rejected_fraud}, {@code + * rejected_incomplete_verification}, {@code rejected_listed}, {@code rejected_other}, + * {@code rejected_platform_fraud}, {@code rejected_platform_other}, {@code + * rejected_platform_terms_of_service}, {@code rejected_terms_of_service}, {@code + * requirements_past_due}, {@code requirements_pending_verification}, {@code + * restricted_other}, {@code unsupported_business}, {@code unsupported_country}, or + * {@code unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over RTP + * rails. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Rtp extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code rejected}, {@code restricted}, or + * {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code rejected_fraud}, {@code + * rejected_incomplete_verification}, {@code rejected_listed}, {@code rejected_other}, + * {@code rejected_platform_fraud}, {@code rejected_platform_other}, {@code + * rejected_platform_terms_of_service}, {@code rejected_terms_of_service}, {@code + * requirements_past_due}, {@code requirements_pending_verification}, {@code + * restricted_other}, {@code unsupported_business}, {@code unsupported_country}, or + * {@code unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over SEPA + * rails. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Sepa extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code rejected}, {@code restricted}, or + * {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code rejected_fraud}, {@code + * rejected_incomplete_verification}, {@code rejected_listed}, {@code rejected_other}, + * {@code rejected_platform_fraud}, {@code rejected_platform_other}, {@code + * rejected_platform_terms_of_service}, {@code rejected_terms_of_service}, {@code + * requirements_past_due}, {@code requirements_pending_verification}, {@code + * restricted_other}, {@code unsupported_business}, {@code unsupported_country}, or + * {@code unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over SWIFT. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Swift extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code rejected}, {@code restricted}, or + * {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code rejected_fraud}, {@code + * rejected_incomplete_verification}, {@code rejected_listed}, {@code rejected_other}, + * {@code rejected_platform_fraud}, {@code rejected_platform_other}, {@code + * rejected_platform_terms_of_service}, {@code rejected_terms_of_service}, {@code + * requirements_past_due}, {@code requirements_pending_verification}, {@code + * restricted_other}, {@code unsupported_business}, {@code unsupported_country}, or + * {@code unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + } + + /** Enables this Account to receive OutboundPayments to a linked debit card. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Cards extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code rejected}, {@code restricted}, or + * {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code rejected_fraud}, {@code + * rejected_incomplete_verification}, {@code rejected_listed}, {@code rejected_other}, + * {@code rejected_platform_fraud}, {@code rejected_platform_other}, {@code + * rejected_platform_terms_of_service}, {@code rejected_terms_of_service}, {@code + * requirements_past_due}, {@code requirements_pending_verification}, {@code + * restricted_other}, {@code unsupported_business}, {@code unsupported_country}, or + * {@code unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + /** Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). */ @Getter @Setter @@ -3935,6 +4456,14 @@ public static class Defaults extends StripeObject { @SerializedName("locales") List locales; + /** + * Default payout methods per currency. Keys are three-letter ISO currency codes, in lowercase. + * Values are v2 Payout Method IDs. + */ + @SerializedName("payout_methods") + Map payoutMethods; + /** Account profile information. */ @SerializedName("profile") Profile profile; @@ -4005,6 +4534,13 @@ public static class Responsibilities extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class FutureRequirements extends StripeObject { + /** + * A list of alternative sets of requirements that can be provided in lieu of requirements in + * {@code entries}. + */ + @SerializedName("alternatives") + List alternatives; + /** A list of requirements for the Account. */ @SerializedName("entries") List entries; @@ -4017,6 +4553,227 @@ public static class FutureRequirements extends StripeObject { @SerializedName("summary") Summary summary; + /** + * For more details about Alternative, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Alternative extends StripeObject { + /** + * The alternative sets of requirements that can be provided. Providing every entry in any one + * of these options resolves all of the requirements in {@code original_entries}. + */ + @SerializedName("options") + List options; + + /** + * The requirements that can be satisfied either directly, or by providing every entry in any + * one of {@code options}. + */ + @SerializedName("original_entries") + List originalEntries; + + /** + * For more details about Option, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Option extends StripeObject { + /** The requirements that must all be provided to satisfy this option. */ + @SerializedName("entries") + List entries; + + /** + * For more details about Entry, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Entry extends StripeObject { + /** + * Indicates whether the user or Stripe is currently responsible for taking action on the + * requirement. Value can be {@code user} or {@code stripe}. + * + *

One of {@code stripe}, or {@code user}. + */ + @SerializedName("awaiting_action_from") + String awaitingActionFrom; + + /** Machine-readable string describing the requirement. */ + @SerializedName("description") + String description; + + /** + * Descriptions of why the requirement must be collected, or why the collected information + * isn't satisfactory to Stripe. + */ + @SerializedName("errors") + List errors; + + /** A reference to the location of the requirement. */ + @SerializedName("reference") + Reference reference; + + /** + * For more details about Errors, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Errors extends StripeObject { + /** + * Machine-readable code describing the error. + * + *

One of {@code invalid_address_city_state_postal_code}, {@code + * invalid_address_cmra_address}, {@code invalid_address_highway_contract_box}, {@code + * invalid_address_private_mailbox}, {@code invalid_address_registered_agent_address}, + * {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, + * {@code invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, + * {@code invalid_statement_descriptor_business_mismatch}, {@code + * invalid_statement_descriptor_denylisted}, {@code + * invalid_statement_descriptor_length}, {@code + * invalid_statement_descriptor_prefix_denylisted}, {@code + * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code + * invalid_tax_id}, {@code invalid_tax_id_format}, {@code invalid_tos_acceptance}, + * {@code invalid_url_denylisted}, {@code invalid_url_format}, {@code + * invalid_url_website_business_information_mismatch}, {@code + * invalid_url_website_empty}, {@code invalid_url_website_inaccessible}, {@code + * invalid_url_website_inaccessible_geoblocked}, {@code + * invalid_url_website_inaccessible_password_protected}, {@code + * invalid_url_website_incomplete}, {@code + * invalid_url_website_incomplete_cancellation_policy}, {@code + * invalid_url_website_incomplete_customer_service_details}, {@code + * invalid_url_website_incomplete_legal_restrictions}, {@code + * invalid_url_website_incomplete_refund_policy}, {@code + * invalid_url_website_incomplete_return_policy}, {@code + * invalid_url_website_incomplete_terms_and_conditions}, {@code + * invalid_url_website_incomplete_under_construction}, {@code + * invalid_url_website_other}, {@code invalid_url_web_presence_detected}, {@code + * invalid_value_other}, {@code unresolvable_ip_address}, {@code + * unresolvable_postal_code}, {@code verification_directors_mismatch}, {@code + * verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code + * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, + * {@code verification_document_expired}, {@code verification_document_failed_copy}, + * {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, + * {@code verification_document_fraudulent}, {@code + * verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, + * {@code verification_document_invalid}, {@code + * verification_document_issue_or_expiry_date_missing}, {@code + * verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code + * verification_document_name_mismatch}, {@code verification_document_name_missing}, + * {@code verification_document_nationality_mismatch}, {@code + * verification_document_not_readable}, {@code verification_document_not_signed}, {@code + * verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, + * {@code verification_document_too_large}, {@code + * verification_document_type_not_supported}, {@code verification_extraneous_directors}, + * {@code verification_failed_address_match}, {@code + * verification_failed_business_iec_number}, {@code verification_failed_document_match}, + * {@code verification_failed_id_number_match}, {@code + * verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code + * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, + * {@code verification_failed_tax_id_not_issued}, {@code + * verification_missing_directors}, {@code verification_missing_executives}, {@code + * verification_missing_owners}, {@code + * verification_requires_additional_memorandum_of_associations}, {@code + * verification_requires_additional_proof_of_registration}, {@code + * verification_selfie_document_missing_photo}, {@code + * verification_selfie_face_mismatch}, {@code verification_selfie_manipulated}, {@code + * verification_selfie_unverified_other}, {@code verification_supportability}, or {@code + * verification_token_stale}. + */ + @SerializedName("code") + String code; + + /** Human-readable description of the error. */ + @SerializedName("description") + String description; + } + + /** A reference to the location of the requirement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Reference extends StripeObject { + /** If {@code inquiry} is the type, the inquiry token. */ + @SerializedName("inquiry") + String inquiry; + + /** If {@code resource} is the type, the resource token. */ + @SerializedName("resource") + String resource; + + /** + * The type of the reference. If the type is "inquiry", the inquiry token can + * be found in the "inquiry" field. Otherwise the type is an API resource, the + * token for which can be found in the "resource" field. + * + *

One of {@code inquiry}, {@code payment_method}, or {@code person}. + */ + @SerializedName("type") + String type; + } + } + } + + /** + * For more details about OriginalEntry, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class OriginalEntry extends StripeObject { + /** Machine-readable string describing the requirement. */ + @SerializedName("description") + String description; + + /** A reference to the location of the requirement. */ + @SerializedName("reference") + Reference reference; + + /** A reference to the location of the requirement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Reference extends StripeObject { + /** If {@code inquiry} is the type, the inquiry token. */ + @SerializedName("inquiry") + String inquiry; + + /** If {@code resource} is the type, the resource token. */ + @SerializedName("resource") + String resource; + + /** + * The type of the reference. If the type is "inquiry", the inquiry token can be + * found in the "inquiry" field. Otherwise the type is an API resource, the + * token for which can be found in the "resource" field. + * + *

One of {@code inquiry}, {@code payment_method}, or {@code person}. + */ + @SerializedName("type") + String type; + } + } + } + /** * For more details about Entry, please refer to the API * Reference. @@ -4026,7 +4783,7 @@ public static class FutureRequirements extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Entry extends StripeObject { /** - * Indicates whether the platform or Stripe is currently responsible for taking action on the + * Indicates whether the user or Stripe is currently responsible for taking action on the * requirement. Value can be {@code user} or {@code stripe}. * *

One of {@code stripe}, or {@code user}. @@ -4173,7 +4930,9 @@ public static class RestrictsCapability extends StripeObject { *

One of {@code ach_debit_payments}, {@code acss_debit_payments}, {@code * affirm_payments}, {@code afterpay_clearpay_payments}, {@code alma_payments}, {@code * amazon_pay_payments}, {@code automatic_indirect_tax}, {@code au_becs_debit_payments}, - * {@code bacs_debit_payments}, {@code bancontact_payments}, {@code bank_accounts.local}, + * {@code bacs_debit_payments}, {@code bancontact_payments}, {@code bank_accounts.ach}, + * {@code bank_accounts.fedwire}, {@code bank_accounts.fps}, {@code bank_accounts.local}, + * {@code bank_accounts.rtp}, {@code bank_accounts.sepa}, {@code bank_accounts.swift}, * {@code bank_accounts.wire}, {@code blik_payments}, {@code blik_recurring_payments}, * {@code boleto_payments}, {@code cards}, {@code card_payments}, {@code * cartes_bancaires_payments}, {@code cashapp_payments}, {@code eps_payments}, {@code @@ -4517,19 +5276,11 @@ public static class RepresentativeDeclaration extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class TermsOfService extends StripeObject { - /** - * Details on the Account's acceptance of the Stripe Services - * Agreement. - */ + /** Details on the Account's acceptance of the Stripe Services Agreement. */ @SerializedName("account") InnerAccount account; - /** - * Details on the Account's acceptance of the Stripe Services - * Agreement. - */ + /** Details on the Account's acceptance of the Stripe Services Agreement. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -4805,8 +5556,8 @@ public static class Documents extends StripeObject { public static class BankAccountOwnershipVerification extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -4827,8 +5578,8 @@ public static class BankAccountOwnershipVerification extends StripeObject { public static class CompanyLicense extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -4849,8 +5600,8 @@ public static class CompanyLicense extends StripeObject { public static class CompanyMemorandumOfAssociation extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -4874,8 +5625,8 @@ public static class CompanyMemorandumOfAssociation extends StripeObject { public static class CompanyMinisterialDecree extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -4899,8 +5650,8 @@ public static class CompanyMinisterialDecree extends StripeObject { public static class CompanyRegistrationVerification extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -4921,8 +5672,8 @@ public static class CompanyRegistrationVerification extends StripeObject { public static class CompanyTaxIdVerification extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -4942,8 +5693,8 @@ public static class CompanyTaxIdVerification extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class PrimaryVerification extends StripeObject { /** - * The file upload - * tokens for the front and back of the verification document. + * The file upload tokens for the + * front and back of the verification document. */ @SerializedName("front_back") FrontBack frontBack; @@ -4957,29 +5708,27 @@ public static class PrimaryVerification extends StripeObject { String type; /** - * The file upload - * tokens for the front and back of the verification document. + * The file upload tokens for the + * front and back of the verification document. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class FrontBack extends StripeObject { /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 - * MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") String front; @@ -4993,8 +5742,8 @@ public static class FrontBack extends StripeObject { public static class ProofOfAddress extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -5018,8 +5767,8 @@ public static class ProofOfAddress extends StripeObject { public static class ProofOfRegistration extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -5054,8 +5803,8 @@ public static class Signer extends StripeObject { public static class ProofOfUltimateBeneficialOwnership extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -5625,8 +6374,8 @@ public static class Documents extends StripeObject { public static class CompanyAuthorization extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -5649,8 +6398,8 @@ public static class CompanyAuthorization extends StripeObject { public static class Passport extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -5672,8 +6421,8 @@ public static class Passport extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class PrimaryVerification extends StripeObject { /** - * The file upload - * tokens for the front and back of the verification document. + * The file upload tokens for the + * front and back of the verification document. */ @SerializedName("front_back") FrontBack frontBack; @@ -5687,29 +6436,27 @@ public static class PrimaryVerification extends StripeObject { String type; /** - * The file upload - * tokens for the front and back of the verification document. + * The file upload tokens for the + * front and back of the verification document. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class FrontBack extends StripeObject { /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 - * MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") String front; @@ -5725,8 +6472,8 @@ public static class FrontBack extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class SecondaryVerification extends StripeObject { /** - * The file upload - * tokens for the front and back of the verification document. + * The file upload tokens for the + * front and back of the verification document. */ @SerializedName("front_back") FrontBack frontBack; @@ -5740,29 +6487,27 @@ public static class SecondaryVerification extends StripeObject { String type; /** - * The file upload - * tokens for the front and back of the verification document. + * The file upload tokens for the + * front and back of the verification document. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class FrontBack extends StripeObject { /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 - * MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") String front; @@ -5779,8 +6524,8 @@ public static class FrontBack extends StripeObject { public static class Visa extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -6017,6 +6762,13 @@ public static class Kanji extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Requirements extends StripeObject { + /** + * A list of alternative sets of requirements that can be provided in lieu of requirements in + * {@code entries}. + */ + @SerializedName("alternatives") + List alternatives; + /** A list of requirements for the Account. */ @SerializedName("entries") List entries; @@ -6025,6 +6777,227 @@ public static class Requirements extends StripeObject { @SerializedName("summary") Summary summary; + /** + * For more details about Alternative, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Alternative extends StripeObject { + /** + * The alternative sets of requirements that can be provided. Providing every entry in any one + * of these options resolves all of the requirements in {@code original_entries}. + */ + @SerializedName("options") + List options; + + /** + * The requirements that can be satisfied either directly, or by providing every entry in any + * one of {@code options}. + */ + @SerializedName("original_entries") + List originalEntries; + + /** + * For more details about Option, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Option extends StripeObject { + /** The requirements that must all be provided to satisfy this option. */ + @SerializedName("entries") + List entries; + + /** + * For more details about Entry, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Entry extends StripeObject { + /** + * Indicates whether the user or Stripe is currently responsible for taking action on the + * requirement. Value can be {@code user} or {@code stripe}. + * + *

One of {@code stripe}, or {@code user}. + */ + @SerializedName("awaiting_action_from") + String awaitingActionFrom; + + /** Machine-readable string describing the requirement. */ + @SerializedName("description") + String description; + + /** + * Descriptions of why the requirement must be collected, or why the collected information + * isn't satisfactory to Stripe. + */ + @SerializedName("errors") + List errors; + + /** A reference to the location of the requirement. */ + @SerializedName("reference") + Reference reference; + + /** + * For more details about Errors, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Errors extends StripeObject { + /** + * Machine-readable code describing the error. + * + *

One of {@code invalid_address_city_state_postal_code}, {@code + * invalid_address_cmra_address}, {@code invalid_address_highway_contract_box}, {@code + * invalid_address_private_mailbox}, {@code invalid_address_registered_agent_address}, + * {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, + * {@code invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, + * {@code invalid_statement_descriptor_business_mismatch}, {@code + * invalid_statement_descriptor_denylisted}, {@code + * invalid_statement_descriptor_length}, {@code + * invalid_statement_descriptor_prefix_denylisted}, {@code + * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code + * invalid_tax_id}, {@code invalid_tax_id_format}, {@code invalid_tos_acceptance}, + * {@code invalid_url_denylisted}, {@code invalid_url_format}, {@code + * invalid_url_website_business_information_mismatch}, {@code + * invalid_url_website_empty}, {@code invalid_url_website_inaccessible}, {@code + * invalid_url_website_inaccessible_geoblocked}, {@code + * invalid_url_website_inaccessible_password_protected}, {@code + * invalid_url_website_incomplete}, {@code + * invalid_url_website_incomplete_cancellation_policy}, {@code + * invalid_url_website_incomplete_customer_service_details}, {@code + * invalid_url_website_incomplete_legal_restrictions}, {@code + * invalid_url_website_incomplete_refund_policy}, {@code + * invalid_url_website_incomplete_return_policy}, {@code + * invalid_url_website_incomplete_terms_and_conditions}, {@code + * invalid_url_website_incomplete_under_construction}, {@code + * invalid_url_website_other}, {@code invalid_url_web_presence_detected}, {@code + * invalid_value_other}, {@code unresolvable_ip_address}, {@code + * unresolvable_postal_code}, {@code verification_directors_mismatch}, {@code + * verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code + * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, + * {@code verification_document_expired}, {@code verification_document_failed_copy}, + * {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, + * {@code verification_document_fraudulent}, {@code + * verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, + * {@code verification_document_invalid}, {@code + * verification_document_issue_or_expiry_date_missing}, {@code + * verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code + * verification_document_name_mismatch}, {@code verification_document_name_missing}, + * {@code verification_document_nationality_mismatch}, {@code + * verification_document_not_readable}, {@code verification_document_not_signed}, {@code + * verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, + * {@code verification_document_too_large}, {@code + * verification_document_type_not_supported}, {@code verification_extraneous_directors}, + * {@code verification_failed_address_match}, {@code + * verification_failed_business_iec_number}, {@code verification_failed_document_match}, + * {@code verification_failed_id_number_match}, {@code + * verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code + * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, + * {@code verification_failed_tax_id_not_issued}, {@code + * verification_missing_directors}, {@code verification_missing_executives}, {@code + * verification_missing_owners}, {@code + * verification_requires_additional_memorandum_of_associations}, {@code + * verification_requires_additional_proof_of_registration}, {@code + * verification_selfie_document_missing_photo}, {@code + * verification_selfie_face_mismatch}, {@code verification_selfie_manipulated}, {@code + * verification_selfie_unverified_other}, {@code verification_supportability}, or {@code + * verification_token_stale}. + */ + @SerializedName("code") + String code; + + /** Human-readable description of the error. */ + @SerializedName("description") + String description; + } + + /** A reference to the location of the requirement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Reference extends StripeObject { + /** If {@code inquiry} is the type, the inquiry token. */ + @SerializedName("inquiry") + String inquiry; + + /** If {@code resource} is the type, the resource token. */ + @SerializedName("resource") + String resource; + + /** + * The type of the reference. If the type is "inquiry", the inquiry token can + * be found in the "inquiry" field. Otherwise the type is an API resource, the + * token for which can be found in the "resource" field. + * + *

One of {@code inquiry}, {@code payment_method}, or {@code person}. + */ + @SerializedName("type") + String type; + } + } + } + + /** + * For more details about OriginalEntry, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class OriginalEntry extends StripeObject { + /** Machine-readable string describing the requirement. */ + @SerializedName("description") + String description; + + /** A reference to the location of the requirement. */ + @SerializedName("reference") + Reference reference; + + /** A reference to the location of the requirement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Reference extends StripeObject { + /** If {@code inquiry} is the type, the inquiry token. */ + @SerializedName("inquiry") + String inquiry; + + /** If {@code resource} is the type, the resource token. */ + @SerializedName("resource") + String resource; + + /** + * The type of the reference. If the type is "inquiry", the inquiry token can be + * found in the "inquiry" field. Otherwise the type is an API resource, the + * token for which can be found in the "resource" field. + * + *

One of {@code inquiry}, {@code payment_method}, or {@code person}. + */ + @SerializedName("type") + String type; + } + } + } + /** * For more details about Entry, please refer to the API * Reference. @@ -6034,7 +7007,7 @@ public static class Requirements extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Entry extends StripeObject { /** - * Indicates whether the platform or Stripe is currently responsible for taking action on the + * Indicates whether the user or Stripe is currently responsible for taking action on the * requirement. Value can be {@code user} or {@code stripe}. * *

One of {@code stripe}, or {@code user}. @@ -6181,7 +7154,9 @@ public static class RestrictsCapability extends StripeObject { *

One of {@code ach_debit_payments}, {@code acss_debit_payments}, {@code * affirm_payments}, {@code afterpay_clearpay_payments}, {@code alma_payments}, {@code * amazon_pay_payments}, {@code automatic_indirect_tax}, {@code au_becs_debit_payments}, - * {@code bacs_debit_payments}, {@code bancontact_payments}, {@code bank_accounts.local}, + * {@code bacs_debit_payments}, {@code bancontact_payments}, {@code bank_accounts.ach}, + * {@code bank_accounts.fedwire}, {@code bank_accounts.fps}, {@code bank_accounts.local}, + * {@code bank_accounts.rtp}, {@code bank_accounts.sepa}, {@code bank_accounts.swift}, * {@code bank_accounts.wire}, {@code blik_payments}, {@code blik_recurring_payments}, * {@code boleto_payments}, {@code cards}, {@code card_payments}, {@code * cartes_bancaires_payments}, {@code cashapp_payments}, {@code eps_payments}, {@code diff --git a/src/main/java/com/stripe/model/v2/core/AccountPerson.java b/src/main/java/com/stripe/model/v2/core/AccountPerson.java index 95742b9753e1..38815ff8fdd4 100644 --- a/src/main/java/com/stripe/model/v2/core/AccountPerson.java +++ b/src/main/java/com/stripe/model/v2/core/AccountPerson.java @@ -358,8 +358,8 @@ public static class Documents extends StripeObject { public static class CompanyAuthorization extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -380,8 +380,8 @@ public static class CompanyAuthorization extends StripeObject { public static class Passport extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -401,8 +401,8 @@ public static class Passport extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class PrimaryVerification extends StripeObject { /** - * The file upload tokens - * for the front and back of the verification document. + * The file upload tokens for the front + * and back of the verification document. */ @SerializedName("front_back") FrontBack frontBack; @@ -416,27 +416,27 @@ public static class PrimaryVerification extends StripeObject { String type; /** - * The file upload tokens - * for the front and back of the verification document. + * The file upload tokens for the front + * and back of the verification document. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class FrontBack extends StripeObject { /** - * A file upload token - * representing the back of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; /** - * A file upload token - * representing the front of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") String front; @@ -452,8 +452,8 @@ public static class FrontBack extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class SecondaryVerification extends StripeObject { /** - * The file upload tokens - * for the front and back of the verification document. + * The file upload tokens for the front + * and back of the verification document. */ @SerializedName("front_back") FrontBack frontBack; @@ -467,27 +467,27 @@ public static class SecondaryVerification extends StripeObject { String type; /** - * The file upload tokens - * for the front and back of the verification document. + * The file upload tokens for the front + * and back of the verification document. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class FrontBack extends StripeObject { /** - * A file upload token - * representing the back of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; /** - * A file upload token - * representing the front of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") String front; @@ -504,8 +504,8 @@ public static class FrontBack extends StripeObject { public static class Visa extends StripeObject { /** * One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; diff --git a/src/main/java/com/stripe/model/v2/core/Event.java b/src/main/java/com/stripe/model/v2/core/Event.java index efc719c01700..37c7637d958b 100644 --- a/src/main/java/com/stripe/model/v2/core/Event.java +++ b/src/main/java/com/stripe/model/v2/core/Event.java @@ -74,7 +74,7 @@ public class Event extends StripeObject implements HasId, StripeActiveObject { @SerializedName("reason") Reason reason; - /** For interop events, this is the snapshot event ID. */ + /** For thin events with a corresponding snapshot event, this is the snapshot event ID. */ @SerializedName("snapshot_event") String snapshotEvent; diff --git a/src/main/java/com/stripe/model/v2/core/EventDestination.java b/src/main/java/com/stripe/model/v2/core/EventDestination.java index e821457906a7..c3a280636cc2 100644 --- a/src/main/java/com/stripe/model/v2/core/EventDestination.java +++ b/src/main/java/com/stripe/model/v2/core/EventDestination.java @@ -95,8 +95,9 @@ public class EventDestination extends StripeObject implements HasId { String object; /** - * For snapshot events only, the Stripe API version used to render event objects. Thin events are - * not pinned to an API version. + * For snapshot events only, the Stripe API version used to render event objects. You can't change + * this value after you create the event destination. Thin events are not pinned to an API + * version. */ @SerializedName("snapshot_api_version") String snapshotApiVersion; diff --git a/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java b/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java new file mode 100644 index 000000000000..9695fc04937a --- /dev/null +++ b/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java @@ -0,0 +1,82 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.core.vault; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import java.util.List; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** Use the GBBankAccounts API to create and manage GB bank account objects. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class GbBankAccount extends StripeObject implements HasId { + /** + * Whether this bank account object was archived. Bank account objects can be archived through the + * /archive API, and they will not be automatically archived by Stripe. Archived bank account + * objects cannot be used as outbound destinations and will not appear in the outbound destination + * list. + */ + @SerializedName("archived") + Boolean archived; + + /** + * Closed Enum. The type of the bank account (checking or savings). + * + *

One of {@code checking}, or {@code savings}. + */ + @SerializedName("bank_account_type") + String bankAccountType; + + /** The name of the bank. */ + @SerializedName("bank_name") + String bankName; + + /** Creation time. */ + @SerializedName("created") + Instant created; + + /** The ID of the GBBankAccount object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** The last 4 digits of the account number or IBAN. */ + @SerializedName("last4") + String last4; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.core.vault.gb_bank_account}. + */ + @SerializedName("object") + String object; + + /** + * Whether the GB Bank Account is currently unusable for money movement, despite potentially being + * correctly set up. Please reach out to Stripe Support for more information. + */ + @SerializedName("restricted") + Boolean restricted; + + /** The Sort Code of the bank account. */ + @SerializedName("sort_code") + String sortCode; + + /** The list of currencies supported by this bank account. */ + @SerializedName("supported_currencies") + List supportedCurrencies; +} diff --git a/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java b/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java new file mode 100644 index 000000000000..10515559eefd --- /dev/null +++ b/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java @@ -0,0 +1,136 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.core.vault; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import java.util.List; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * Use the USBankAccounts API to create and manage US bank accounts objects that you can use to + * receive funds. Note that these are not interchangeable with v1 Tokens. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class UsBankAccount extends StripeObject implements HasId { + /** Whether this USBankAccount object was archived. */ + @SerializedName("archived") + Boolean archived; + + /** + * Closed Enum. The type of bank account (checking or savings). + * + *

One of {@code checking}, or {@code savings}. + */ + @SerializedName("bank_account_type") + String bankAccountType; + + /** + * The name of the bank this bank account belongs to. This field is populated automatically by + * Stripe based on the routing number. + */ + @SerializedName("bank_name") + String bankName; + + /** Creation time of the object. */ + @SerializedName("created") + Instant created; + + /** The fedwire routing number of the bank account. */ + @SerializedName("fedwire_routing_number") + String fedwireRoutingNumber; + + /** The ID of the Financial Connections Account used to create the bank account. */ + @SerializedName("financial_connections_account") + String financialConnectionsAccount; + + /** The ID of the USBankAccount object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** The last 4 digits of the account number. */ + @SerializedName("last4") + String last4; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.core.vault.us_bank_account}. + */ + @SerializedName("object") + String object; + + /** + * Whether the US Bank Account is currently unusable for money movement, despite potentially being + * correctly set up. Please reach out to Stripe Support for more information. + */ + @SerializedName("restricted") + Boolean restricted; + + /** The ACH routing number of the bank account. */ + @SerializedName("routing_number") + String routingNumber; + + /** The list of currencies supported by this bank account. */ + @SerializedName("supported_currencies") + List supportedCurrencies; + + /** The bank account verification details. */ + @SerializedName("verification") + Verification verification; + + /** The bank account verification details. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Verification extends StripeObject { + /** The microdeposit verification details if the status is awaiting verification. */ + @SerializedName("microdeposit_verification_details") + MicrodepositVerificationDetails microdepositVerificationDetails; + + /** + * The bank account verification status. + * + *

One of {@code awaiting_verification}, {@code unverified}, {@code verification_failed}, or + * {@code verified}. + */ + @SerializedName("status") + String status; + + /** The microdeposit verification details if the status is awaiting verification. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MicrodepositVerificationDetails extends StripeObject { + /** Time when microdeposits will expire and have to be re-sent. */ + @SerializedName("expires") + Instant expires; + + /** + * Microdeposit type can be amounts or descriptor_type. + * + *

One of {@code amounts}, or {@code descriptor_code}. + */ + @SerializedName("microdeposit_type") + String microdepositType; + + /** Time when microdeposits were sent. */ + @SerializedName("sent") + Instant sent; + } + } +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java b/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java new file mode 100644 index 000000000000..d2b82884aafb --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/Adjustment.java @@ -0,0 +1,114 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +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; +import lombok.Setter; + +/** + * An Adjustment records a credit or debit that Stripe makes to your Financial Account balance, for + * example to correct technical or operational errors. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class Adjustment extends StripeObject implements HasId { + /** + * Details about the original flow object linked to this Adjustment, if applicable. {@code + * adjusted_flow.type} identifies the kind of object. The corresponding field contains its ID: for + * an InboundTransfer, {@code adjusted_flow.inbound_transfer} contains the InboundTransfer's ID. + * Pass that ID to the {@code adjusted_flow} parameter on List Adjustments. + */ + @SerializedName("adjusted_flow") + AdjustedFlow adjustedFlow; + + /** The amount of the Adjustment. */ + @SerializedName("amount") + Amount amount; + + /** + * Time at which the object was created. Represented as an RFC 3339 timestamp in UTC with + * millisecond precision, for example {@code 2022-09-18T13:22:18.123Z}. + */ + @SerializedName("created") + Instant created; + + /** A description of the Adjustment and its purpose. */ + @SerializedName("description") + String description; + + /** The ID of the FinancialAccount whose balance this Adjustment affects. */ + @SerializedName("financial_account") + String financialAccount; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.adjustment}. + */ + @SerializedName("object") + String object; + + /** + * Details about the original flow object linked to this Adjustment, if applicable. {@code + * adjusted_flow.type} identifies the kind of object. The corresponding field contains its ID: for + * an InboundTransfer, {@code adjusted_flow.inbound_transfer} contains the InboundTransfer's ID. + * Pass that ID to the {@code adjusted_flow} parameter on List Adjustments. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AdjustedFlow extends StripeObject { + /** If applicable, the ID of the original Adjustment linked to this Adjustment. */ + @SerializedName("adjustment") + String adjustment; + + /** If applicable, the ID of the InboundTransfer linked to this Adjustment. */ + @SerializedName("inbound_transfer") + String inboundTransfer; + + /** If applicable, the ID of the OutboundPayment linked to this Adjustment. */ + @SerializedName("outbound_payment") + String outboundPayment; + + /** If applicable, the ID of the OutboundTransfer linked to this Adjustment. */ + @SerializedName("outbound_transfer") + String outboundTransfer; + + /** If applicable, the ID of the ReceivedCredit linked to this Adjustment. */ + @SerializedName("received_credit") + String receivedCredit; + + /** If applicable, the ID of the ReceivedDebit linked to this Adjustment. */ + @SerializedName("received_debit") + String receivedDebit; + + /** + * Open Enum. If applicable, the type of flow linked to this Adjustment. The field matching this + * value will contain the ID of the flow. + * + *

One of {@code adjustment}, {@code inbound_transfer}, {@code outbound_payment}, {@code + * outbound_transfer}, {@code received_credit}, or {@code received_debit}. + */ + @SerializedName("type") + String type; + } +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java new file mode 100644 index 000000000000..d50b070b5c1c --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java @@ -0,0 +1,197 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +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; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * A FinancialAccount represents a balance and can be the source or destination of money movement. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class FinancialAccount extends StripeObject implements HasId { + /** + * The FinancialAccount's balance, split into {@code available}, {@code inbound_pending}, and + * {@code outbound_pending} balances. Each balance is a hash keyed by lowercase currency codes, + * with an amount for each currency. + */ + @SerializedName("balance") + Balance balance; + + /** + * Open Enum. The country where the LegalEntity associated with the FinancialAccount is based, + * represented as a two-letter country code. + */ + @SerializedName("country") + String country; + + /** + * Time at which the object was created. Represented as an RFC 3339 timestamp in UTC with + * millisecond precision, for example {@code 2022-09-18T13:22:18.123Z}. + */ + @SerializedName("created") + Instant created; + + /** + * A descriptive name for the FinancialAccount, up to 50 characters long. This name appears in the + * Stripe Dashboard and embedded components. + */ + @SerializedName("display_name") + String displayName; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.financial_account}. + */ + @SerializedName("object") + String object; + + /** + * If the FinancialAccount's {@code type} is {@code other}, this hash identifies its actual type. + * Upgrade your API version to see that type in {@code type}. + */ + @SerializedName("other") + Other other; + + /** + * Closed Enum. An enum representing the status of the FinancialAccount. This indicates whether or + * not the FinancialAccount can be used for any money movement flows. + * + *

One of {@code closed}, {@code open}, or {@code pending}. + */ + @SerializedName("status") + String status; + + /** + * If the FinancialAccount's {@code type} is {@code storage}, this hash contains details specific + * to that type. + */ + @SerializedName("storage") + Storage storage; + + /** + * Closed Enum. The type of the FinancialAccount. Details specific to the type appear in the + * matching hash. For example, a {@code storage} FinancialAccount includes a {@code storage} hash. + * + *

One of {@code other}, or {@code storage}. + */ + @SerializedName("type") + String type; + + /** + * The FinancialAccount's balance, split into {@code available}, {@code inbound_pending}, and + * {@code outbound_pending} balances. Each balance is a hash keyed by lowercase currency codes, + * with an amount for each currency. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Balance extends StripeObject { + /** Balance available for money movement. */ + @SerializedName("available") + Map available; + + /** + * Balance of inbound funds that aren't yet available for money movement and will later move to + * the {@code available} balance. + */ + @SerializedName("inbound_pending") + Map inboundPending; + + /** Balance of funds being used for pending outbound money movements. */ + @SerializedName("outbound_pending") + Map outboundPending; + } + + /** + * If the FinancialAccount's {@code type} is {@code other}, this hash identifies its actual type. + * Upgrade your API version to see that type in {@code type}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Other extends StripeObject { + /** + * The FinancialAccount's actual type, represented as a string. Upgrade your API version to see + * this value in {@code financial_account.type}. + */ + @SerializedName("type") + String type; + } + + /** + * If the FinancialAccount's {@code type} is {@code storage}, this hash contains details specific + * to that type. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Storage extends StripeObject { + /** Array of eligibility objects, segmented by bank name and deposit insurance scheme. */ + @SerializedName("deposit_insurance_eligibility") + List depositInsuranceEligibility; + + /** The currencies that this FinancialAccount can hold. */ + @SerializedName("holds_currencies") + List holdsCurrencies; + + /** + * For more details about DepositInsuranceEligibility, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DepositInsuranceEligibility extends StripeObject { + /** + * The bank where funds are stored. + * + *

Equal to {@code fifth_third}. + */ + @SerializedName("bank_name") + String bankName; + + /** Currencies eligible for deposit insurance at this bank under this scheme. */ + @SerializedName("currencies") + List currencies; + + /** + * The deposit insurance scheme. + * + *

One of {@code fdic}, or {@code fdic_passthrough}. + */ + @SerializedName("type") + String type; + } + } +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java new file mode 100644 index 000000000000..f9bbbfda9d5a --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java @@ -0,0 +1,204 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * A FinancialAddress contains information needed to transfer money to a Financial Account. A + * Financial Account can have more than one Financial Address. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class FinancialAddress extends StripeObject implements HasId { + /** Bank account details for this FinancialAddress. */ + @SerializedName("bank_account") + BankAccount bankAccount; + + /** The creation timestamp of the FinancialAddress. */ + @SerializedName("created") + Instant created; + + /** The ID of the FinancialAccount this FinancialAddress corresponds to. */ + @SerializedName("financial_account") + String financialAccount; + + /** The ID of the FinancialAddress. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.financial_address}. + */ + @SerializedName("object") + String object; + + @SerializedName("settlement_currency") + String settlementCurrency; + + /** + * Closed Enum. The status of the FinancialAddress. + * + *

One of {@code active}, {@code archived}, {@code failed}, or {@code pending}. + */ + @SerializedName("status") + String status; + + /** + * Open Enum. The type of FinancialAddress. + * + *

Equal to {@code bank_account}. + */ + @SerializedName("type") + String type; + + /** Bank account details for this FinancialAddress. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankAccount extends StripeObject { + /** ABA bank account details (US). */ + @SerializedName("aba") + Aba aba; + + /** + * The country of the bank account. Always included in the response, but null while the bank + * account is pending and its country is not yet known. + */ + @SerializedName("country") + String country; + + /** Open Enum. The currency of the bank account. */ + @SerializedName("currency") + String currency; + + /** IBAN bank account details. */ + @SerializedName("iban") + Iban iban; + + /** Sort code bank account details (UK). */ + @SerializedName("sort_code") + SortCode sortCode; + + /** + * Open Enum. The type of bank account details. + * + *

One of {@code aba}, {@code iban}, or {@code sort_code}. + */ + @SerializedName("type") + String type; + + /** ABA bank account details (US). */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Aba extends StripeObject { + /** The name of the account holder. */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** The full account number. Empty while the bank account is pending allocation. */ + @SerializedName("account_number") + String accountNumber; + + /** The address of the account holder. */ + @SerializedName("address") + Address address; + + /** The name of the bank. */ + @SerializedName("bank_name") + String bankName; + + /** The ABA routing number. */ + @SerializedName("routing_number") + String routingNumber; + + /** The address of the account holder. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** City. */ + @SerializedName("city") + String city; + + /** Country. */ + @SerializedName("country") + String country; + + /** Address line 1. */ + @SerializedName("line1") + String line1; + + /** Address line 2. */ + @SerializedName("line2") + String line2; + + /** Postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State or province. */ + @SerializedName("state") + String state; + + /** Town or suburb. */ + @SerializedName("town") + String town; + } + } + + /** IBAN bank account details. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Iban extends StripeObject { + /** The name of the account holder. */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** The name of the bank. */ + @SerializedName("bank_name") + String bankName; + + /** The full IBAN. Empty while the bank account is pending allocation. */ + @SerializedName("iban") + String iban; + } + + /** Sort code bank account details (UK). */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SortCode extends StripeObject { + /** The name of the account holder. */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** The full account number. Empty while the bank account is pending allocation. */ + @SerializedName("account_number") + String accountNumber; + + /** The sort code. */ + @SerializedName("sort_code") + String sortCode; + } + } +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddressCreditSimulation.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddressCreditSimulation.java new file mode 100644 index 000000000000..1fb0a818aa90 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddressCreditSimulation.java @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.StripeObject; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * Credit Simulations represent simulated credit transactions applied to financial addresses for + * testing purposes. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class FinancialAddressCreditSimulation extends StripeObject { + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.financial_address_credit_simulation}. + */ + @SerializedName("object") + String object; + + /** The status of the request, signifying whether a simulated credit was initiated. */ + @SerializedName("status") + String status; +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java b/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java new file mode 100644 index 000000000000..7917e3a84f89 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/InboundTransfer.java @@ -0,0 +1,240 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +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; +import lombok.Getter; +import lombok.Setter; + +/** + * An InboundTransfer object, representing a money movement from a user owned PaymentMethod to a + * FinancialAccount belonging to the same user. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class InboundTransfer extends StripeObject implements HasId { + /** The amount in specified currency that will land in the FinancialAccount balance. */ + @SerializedName("amount") + Amount amount; + + /** + * Creation time of the InboundTransfer. Represented as a RFC 3339 date & time UTC value in + * millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("created") + Instant created; + + /** A freeform text field provided by user, containing metadata. */ + @SerializedName("description") + String description; + + /** A nested object containing information about the origin of the InboundTransfer. */ + @SerializedName("from") + From from; + + /** Unique identifier for the InboundTransfer. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.inbound_transfer}. + */ + @SerializedName("object") + String object; + + /** A nested object containing information about the destination of the InboundTransfer. */ + @SerializedName("to") + To to; + + /** + * A list of history objects, representing changes in the state of the InboundTransfer. The most + * recent entry's type indicates the current status of the InboundTransfer. + */ + @SerializedName("transfer_history") + List transferHistory; + + /** A nested object containing information about the origin of the InboundTransfer. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class From extends StripeObject { + /** The amount in specified currency that was debited from the Payment Method. */ + @SerializedName("debited") + Amount debited; + + /** + * The bank account credential used to fund the InboundTransfer (for example, a US bank + * account), not a Payments API {@code pm_} PaymentMethod. + */ + @SerializedName("payment_method") + PaymentMethod paymentMethod; + + /** + * The bank account credential used to fund the InboundTransfer (for example, a US bank + * account), not a Payments API {@code pm_} PaymentMethod. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethod extends StripeObject { + /** + * The type of PaymentMethod used to create the InboundTransfer. Clients should tolerate + * future values. + */ + @SerializedName("type") + String type; + + /** The destination US bank account identifier. eg "usba_***". */ + @SerializedName("us_bank_account") + String usBankAccount; + } + } + + /** A nested object containing information about the destination of the InboundTransfer. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class To extends StripeObject { + /** The amount by which the FinancialAccount balance is credited. */ + @SerializedName("credited") + Amount credited; + + /** The FinancialAccount that funds will land in. */ + @SerializedName("financial_account") + String financialAccount; + } + + /** + * For more details about TransferHistory, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TransferHistory extends StripeObject implements HasId { + /** The InboundTransfer failed. See {@code failure_reason} for more details. */ + @SerializedName("bank_debit_failed") + BankDebitFailed bankDebitFailed; + + /** + * The InboundTransfer was submitted to the scheme for processing. The debit is still in + * progress and can later succeed or fail. + */ + @SerializedName("bank_debit_processing") + BankDebitProcessing bankDebitProcessing; + + /** + * The InboundTransfer was created and is waiting to be submitted to the scheme for processing. + */ + @SerializedName("bank_debit_queued") + BankDebitQueued bankDebitQueued; + + /** The InboundTransfer was returned. The original transaction has been reversed. */ + @SerializedName("bank_debit_returned") + BankDebitReturned bankDebitReturned; + + /** + * The InboundTransfer succeeded. Funds might not yet be available; check the associated + * Transaction for availability. + */ + @SerializedName("bank_debit_succeeded") + BankDebitSucceeded bankDebitSucceeded; + + /** Creation time of the HistoryEntry in RFC 3339 format and UTC. */ + @SerializedName("created") + Instant created; + + /** Effective at time of the HistoryEntry in RFC 3339 format and UTC. */ + @SerializedName("effective_at") + Instant effectiveAt; + + /** A unique ID for the HistoryEntry. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Open Enum. The type of the HistoryEntry. + * + *

One of {@code bank_debit_failed}, {@code bank_debit_processing}, {@code + * bank_debit_queued}, {@code bank_debit_returned}, or {@code bank_debit_succeeded}. + */ + @SerializedName("type") + String type; + + /** The InboundTransfer failed. See {@code failure_reason} for more details. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankDebitFailed extends StripeObject { + /** + * Open Enum. The return reason for the failed InboundTransfer. + * + *

One of {@code bank_account_closed}, {@code bank_account_not_found}, {@code + * bank_debit_could_not_be_processed}, {@code bank_debit_not_authorized}, or {@code + * insufficient_funds}. + */ + @SerializedName("failure_reason") + String failureReason; + } + + /** + * The InboundTransfer was submitted to the scheme for processing. The debit is still in + * progress and can later succeed or fail. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankDebitProcessing extends StripeObject {} + + /** + * The InboundTransfer was created and is waiting to be submitted to the scheme for processing. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankDebitQueued extends StripeObject {} + + /** The InboundTransfer was returned. The original transaction has been reversed. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankDebitReturned extends StripeObject { + /** + * Open Enum. The return reason for the returned InboundTransfer. + * + *

One of {@code bank_account_closed}, {@code bank_account_not_found}, {@code + * bank_debit_could_not_be_processed}, {@code bank_debit_not_authorized}, or {@code + * insufficient_funds}. + */ + @SerializedName("return_reason") + String returnReason; + } + + /** + * The InboundTransfer succeeded. Funds might not yet be available; check the associated + * Transaction for availability. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankDebitSucceeded extends StripeObject {} + } +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java new file mode 100644 index 000000000000..751d5045de4b --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java @@ -0,0 +1,406 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +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; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * OutboundPayment represents a single money movement from one FinancialAccount you own to a payout + * method someone else owns. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class OutboundPayment extends StripeObject implements HasId { + /** The amount and currency requested for this OutboundPayment. */ + @SerializedName("amount") + Amount amount; + + /** Returns true if the OutboundPayment can be canceled, and false otherwise. */ + @SerializedName("cancelable") + Boolean cancelable; + + /** + * Time at which the OutboundPayment was created. Represented as a RFC 3339 date & time UTC + * value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("created") + Instant created; + + /** An arbitrary string attached to the OutboundPayment. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** + * The date when funds are expected to arrive in the payout method. This field is not set if the + * payout method is in a {@code failed}, {@code canceled}, or {@code returned} state. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("expected_arrival_date") + Instant expectedArrivalDate; + + /** The FinancialAccount that funds were pulled from. */ + @SerializedName("from") + From from; + + /** Unique identifier for the OutboundPayment. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.outbound_payment}. + */ + @SerializedName("object") + String object; + + /** The PayoutIntent ID that triggered this OutboundPayment. */ + @SerializedName("payout_intent") + String payoutIntent; + + /** Details about the OutboundPayment notification settings for recipient. */ + @SerializedName("recipient_notification") + RecipientNotification recipientNotification; + + /** + * The ID of the RecipientVerification for this OutboundPayment. Required where recipient-name + * verification is mandated before creating an OutboundPayment. + */ + @SerializedName("recipient_verification") + String recipientVerification; + + /** + * The description that appears on the receiving end of an OutboundPayment (for example, on a bank + * statement). Defaults to {@code STRIPE} if not configured in the account settings. + */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + /** + * Current status of the OutboundPayment. An OutboundPayment is {@code processing} after creation. + * It becomes {@code posted} when funds leave the account, {@code failed} if it cannot be sent, + * {@code canceled} if canceled before posting, or {@code returned} if the funds are returned. + * + *

One of {@code canceled}, {@code failed}, {@code posted}, {@code processing}, or {@code + * returned}. + */ + @SerializedName("status") + String status; + + /** + * Status details for an OutboundPayment in a {@code processing}, {@code failed}, or {@code + * returned} state. + */ + @SerializedName("status_details") + StatusDetails statusDetails; + + /** Hash containing timestamps of when the object transitioned to a particular status. */ + @SerializedName("status_transitions") + StatusTransitions statusTransitions; + + /** To which payout method the OutboundPayment was sent. */ + @SerializedName("to") + To to; + + /** Information to track this OutboundPayment with the recipient bank. */ + @SerializedName("tracking_details") + TrackingDetails trackingDetails; + + /** The FinancialAccount that funds were pulled from. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class From extends StripeObject { + /** The monetary amount debited from the sender, only set on responses. */ + @SerializedName("debited") + Amount debited; + + /** The FinancialAccount that funds were pulled from. */ + @SerializedName("financial_account") + String financialAccount; + } + + /** Details about the OutboundPayment notification settings for recipient. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RecipientNotification extends StripeObject { + /** + * Closed Enum. Configuration option to enable or disable notifications to recipients. Do not + * send notifications when {@code setting} is {@code none}. Use the account setting when {@code + * setting} is {@code configured} or omitted. + * + *

One of {@code configured}, or {@code none}. + */ + @SerializedName("setting") + String setting; + } + + /** + * Status details for an OutboundPayment in a {@code processing}, {@code failed}, or {@code + * returned} state. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetails extends StripeObject { + /** The {@code failed} status reason. */ + @SerializedName("failed") + Failed failed; + + /** The {@code processing} status details. */ + @SerializedName("processing") + Processing processing; + + /** The {@code returned} status reason. */ + @SerializedName("returned") + Returned returned; + + /** The {@code failed} status reason. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Failed extends StripeObject { + /** + * Open Enum. The {@code failed} status reason. + * + *

One of {@code fx_rate_drift_exceeded_after_review}, {@code + * payout_method_amount_limit_exceeded}, {@code payout_method_declined}, {@code + * payout_method_does_not_exist}, {@code payout_method_expired}, {@code + * payout_method_unsupported}, {@code payout_method_usage_frequency_limit_exceeded}, {@code + * review_rejected}, or {@code unknown_failure}. + */ + @SerializedName("reason") + String reason; + } + + /** The {@code processing} status details. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Processing extends StripeObject { + /** + * Open Enum. The {@code processing} status reason. + * + *

Equal to {@code under_review}. + */ + @SerializedName("reason") + String reason; + } + + /** The {@code returned} status reason. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Returned extends StripeObject { + /** + * Open Enum. The {@code returned} status reason. + * + *

One of {@code payout_method_canceled_by_customer}, {@code payout_method_closed}, {@code + * payout_method_currency_unsupported}, {@code payout_method_does_not_exist}, {@code + * payout_method_holder_address_incorrect}, {@code payout_method_holder_details_incorrect}, + * {@code payout_method_holder_name_incorrect}, {@code payout_method_invalid_account_number}, + * {@code payout_method_restricted}, {@code recalled}, or {@code unknown_failure}. + */ + @SerializedName("reason") + String reason; + } + } + + /** Hash containing timestamps of when the object transitioned to a particular status. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusTransitions extends StripeObject { + /** + * Timestamp describing when an OutboundPayment changed status to {@code canceled}. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("canceled_at") + Instant canceledAt; + + /** + * Timestamp describing when an OutboundPayment changed status to {@code failed}. Represented as + * a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("failed_at") + Instant failedAt; + + /** + * Timestamp describing when an OutboundPayment changed status to {@code posted}. Represented as + * a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("posted_at") + Instant postedAt; + + /** + * Timestamp describing when an OutboundPayment changed status to {@code returned}. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("returned_at") + Instant returnedAt; + } + + /** To which payout method the OutboundPayment was sent. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class To extends StripeObject { + /** The monetary amount being credited to the destination. */ + @SerializedName("credited") + Amount credited; + + /** The payout method which the OutboundPayment uses to send payout. */ + @SerializedName("payout_method") + String payoutMethod; + + /** Payout method options for the OutboundPayment. */ + @SerializedName("payout_method_options") + PayoutMethodOptions payoutMethodOptions; + + /** To which account the OutboundPayment is sent. */ + @SerializedName("recipient") + String recipient; + + /** Payout method options for the OutboundPayment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayoutMethodOptions extends StripeObject { + /** Options for bank account payout methods. */ + @SerializedName("bank_account") + BankAccount bankAccount; + + /** Options for bank account payout methods. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankAccount extends StripeObject { + /** Per-network configuration options. */ + @SerializedName("preferred_network_options") + PreferredNetworkOptions preferredNetworkOptions; + + /** The preferred networks to use for this OutboundPayment. */ + @SerializedName("preferred_networks") + List preferredNetworks; + + /** Per-network configuration options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PreferredNetworkOptions extends StripeObject { + /** ACH-specific network options. */ + @SerializedName("ach") + Ach ach; + + /** ACH-specific network options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Ach extends StripeObject { + /** + * Open Enum. ACH submission timing. + * + *

One of {@code next_day}, or {@code same_day}. + */ + @SerializedName("submission") + String submission; + + /** + * The transaction purpose for this ACH payment. + * + *

Equal to {@code payroll}. + */ + @SerializedName("transaction_purpose") + String transactionPurpose; + } + } + } + } + } + + /** Information to track this OutboundPayment with the recipient bank. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TrackingDetails extends StripeObject { + /** Bank account tracking details. */ + @SerializedName("bank_account") + BankAccount bankAccount; + + /** Card tracking details. */ + @SerializedName("card") + Card card; + + /** + * The status of the tracking details for this OutboundPayment. + * + *

One of {@code pending}, {@code supported}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * The type of tracking details for this OutboundPayment. + * + *

One of {@code bank_account}, or {@code card}. + */ + @SerializedName("type") + String type; + + /** Bank account tracking details. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankAccount extends StripeObject { + /** + * A unique identifier that can be used to track this OutboundPayment with the recipient bank. + * Banks might call this a “reference number” or something similar. + */ + @SerializedName("trace_id") + String traceId; + } + + /** Card tracking details. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * A unique identifier that can be used to track this OutboundPayment with the recipient card. + */ + @SerializedName("retrieval_reference") + String retrievalReference; + } + } +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundSetupIntent.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundSetupIntent.java new file mode 100644 index 000000000000..dbc813d2c5e9 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundSetupIntent.java @@ -0,0 +1,62 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** Use the OutboundSetupIntent API to create and setup usable payout methods. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class OutboundSetupIntent extends StripeObject implements HasId { + /** Created timestamp. */ + @SerializedName("created") + Instant created; + + /** ID of the outbound setup intent. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.outbound_setup_intent}. + */ + @SerializedName("object") + String object; + + /** Use the PayoutMethods API to list and interact with PayoutMethod objects. */ + @SerializedName("payout_method") + PayoutMethod payoutMethod; + + /** + * Closed Enum. Status of the outbound setup intent. + * + *

One of {@code canceled}, {@code requires_action}, {@code requires_payout_method}, or {@code + * succeeded}. + */ + @SerializedName("status") + String status; + + /** + * The intended money movement flow this payout method should be set up for, specified in params. + * + *

One of {@code payment}, or {@code transfer}. + */ + @SerializedName("usage_intent") + String usageIntent; +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutIntent.java b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutIntent.java new file mode 100644 index 000000000000..ce5f1625a51b --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutIntent.java @@ -0,0 +1,606 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +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; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** PayoutIntent represents an intent to send funds from a Financial Account to a payout method. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class PayoutIntent extends StripeObject implements HasId { + /** The monetary amount to be sent. */ + @SerializedName("amount") + Amount amount; + + /** + * Controls whether the PayoutIntent requires explicit confirmation before transitioning to {@code + * pending}. Even when {@code automatic}, regulatory requirements may require confirmation. See Send money with Global Payouts for + * details. + * + *

One of {@code automatic}, or {@code manual}. + */ + @SerializedName("confirmation_method") + String confirmationMethod; + + /** + * Time at which the PayoutIntent was created. Represented as a RFC 3339 date & time UTC value + * in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("created") + Instant created; + + /** An arbitrary string attached to the PayoutIntent. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** Estimated fees and taxes. */ + @SerializedName("estimated_fees") + List estimatedFees; + + /** The FinancialAccount that funds are pulled from. */ + @SerializedName("from") + From from; + + /** FX rate information for fee transparency. */ + @SerializedName("fx_quote") + FxQuote fxQuote; + + /** Unique identifier for the PayoutIntent. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** Details about the latest payout associated with this PayoutIntent. */ + @SerializedName("latest_payout") + LatestPayout latestPayout; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** + * Next action required for a PayoutIntent in the {@code requires_action} state. Populated when + * {@code status} is {@code requires_action}. + */ + @SerializedName("next_action") + NextAction nextAction; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.payout_intent}. + */ + @SerializedName("object") + String object; + + /** + * Recipient notification settings for the PayoutIntent. Only applicable when the PayoutIntent + * creates an OutboundPayment. + */ + @SerializedName("recipient_notification") + RecipientNotification recipientNotification; + + /** Recipient verification details for this PayoutIntent. */ + @SerializedName("recipient_verification") + RecipientVerification recipientVerification; + + /** + * Scheduling options for the payout. If omitted, the payout is scheduled for immediate execution. + */ + @SerializedName("schedule_options") + ScheduleOptions scheduleOptions; + + /** + * The description that appears on the receiving end for the payout (for example, on a bank + * statement). + */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + /** + * Current status of the PayoutIntent. + * + *

One of {@code canceled}, {@code pending}, {@code posted}, {@code processing}, or {@code + * requires_action}. + */ + @SerializedName("status") + String status; + + /** Hash containing timestamps of when transitioned to a particular status. */ + @SerializedName("status_transitions") + StatusTransitions statusTransitions; + + /** To which payout method the payout is sent. */ + @SerializedName("to") + To to; + + /** + * For more details about EstimatedFee, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class EstimatedFee extends StripeObject { + /** The fee amount. */ + @SerializedName("amount") + Amount amount; + + /** + * Details about the network and options associated with this fee. Present when {@code type} is + * {@code network_fee}. + */ + @SerializedName("network_fee_details") + NetworkFeeDetails networkFeeDetails; + + /** + * Tax charged for this fee, if applicable. Value expressed as a decimal string in major units. + */ + @SerializedName("tax_amount") + TaxAmount taxAmount; + + /** + * Open Enum. The type of fee. + * + *

One of {@code cross_border_fee}, {@code foreign_exchange_fee}, {@code + * instant_card_payout_fee}, {@code network_fee}, {@code next_day_payout_fee}, {@code + * real_time_payout_fee}, {@code standard_payout_fee}, or {@code wire_payout_fee}. + */ + @SerializedName("type") + String type; + + /** + * Details about the network and options associated with this fee. Present when {@code type} is + * {@code network_fee}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NetworkFeeDetails extends StripeObject { + /** + * The network associated with the fee. + * + *

One of {@code ach}, {@code fedwire}, {@code fps}, {@code local}, {@code rtp}, {@code + * sepa}, or {@code swift}. + */ + @SerializedName("network") + String network; + + /** Per-network options that affect the fee. */ + @SerializedName("network_options") + NetworkOptions networkOptions; + + /** Per-network options that affect the fee. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NetworkOptions extends StripeObject { + /** ACH-specific network fee options. */ + @SerializedName("ach") + Ach ach; + + /** ACH-specific network fee options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Ach extends StripeObject { + /** + * Open Enum. ACH submission timing. + * + *

One of {@code next_day}, or {@code same_day}. + */ + @SerializedName("submission") + String submission; + } + } + } + + /** + * Tax charged for this fee, if applicable. Value expressed as a decimal string in major units. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TaxAmount extends StripeObject { + /** Currency code. */ + @SerializedName("currency") + String currency; + + /** Tax amount value represented as a decimal string in major units. */ + @SerializedName("value_decimal") + String valueDecimal; + } + } + + /** The FinancialAccount that funds are pulled from. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class From extends StripeObject { + /** The currency of the financial account. */ + @SerializedName("currency") + String currency; + + /** Estimated amount to be debited from the financial account. */ + @SerializedName("debited") + Amount debited; + + /** The FinancialAccount that funds are pulled from. */ + @SerializedName("financial_account") + String financialAccount; + } + + /** FX rate information for fee transparency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FxQuote extends StripeObject { + /** + * Open Enum. Duration of the FX rate lock. + * + *

One of {@code five_minutes}, or {@code none}. + */ + @SerializedName("lock_duration") + String lockDuration; + + /** Timestamp when the rate lock expires. Null when rate locking is not supported. */ + @SerializedName("lock_expires_at") + Instant lockExpiresAt; + + /** + * Open Enum. Lock status of the FX rate. + * + *

One of {@code active}, {@code expired}, or {@code none}. + */ + @SerializedName("lock_status") + String lockStatus; + + /** Maps each source currency to its exchange rate into {@code to_currency}. */ + @SerializedName("rates") + Map rates; + + /** The destination currency. */ + @SerializedName("to_currency") + String toCurrency; + + /** + * For more details about Rate, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Rate extends StripeObject { + /** + * The exchange rate from the source currency to {@code to_currency}, represented as a decimal + * string (for example, {@code 1.1520}) to preserve the full precision of the rate. + */ + @SerializedName("exchange_rate") + String exchangeRate; + } + } + + /** Details about the latest payout associated with this PayoutIntent. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LatestPayout extends StripeObject { + /** The ID of the OutboundPayment, if applicable. */ + @SerializedName("outbound_payment") + String outboundPayment; + + /** The ID of the OutboundTransfer, if applicable. */ + @SerializedName("outbound_transfer") + String outboundTransfer; + + /** + * The type of payout. + * + *

One of {@code outbound_payment}, or {@code outbound_transfer}. + */ + @SerializedName("type") + String type; + } + + /** + * Next action required for a PayoutIntent in the {@code requires_action} state. Populated when + * {@code status} is {@code requires_action}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NextAction extends StripeObject { + /** Details about a confirmation required. Populated when {@code type} is {@code confirm}. */ + @SerializedName("confirm") + Confirm confirm; + + /** + * Details about a failure that requires user action. Populated when {@code type} is {@code + * handle_failure}. + */ + @SerializedName("handle_failure") + HandleFailure handleFailure; + + /** + * Open Enum. The type of next action required. + * + *

One of {@code confirm}, or {@code handle_failure}. + */ + @SerializedName("type") + String type; + + /** Details about a confirmation required. Populated when {@code type} is {@code confirm}. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Confirm extends StripeObject { + /** The PayoutIntent fields that must be reviewed before confirmation. */ + @SerializedName("fields_to_review") + List fieldsToReview; + + /** + * Open Enum. The reason the PayoutIntent requires confirmation. + * + *

One of {@code automatically_required}, or {@code manually_requested}. + */ + @SerializedName("reason") + String reason; + } + + /** + * Details about a failure that requires user action. Populated when {@code type} is {@code + * handle_failure}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class HandleFailure extends StripeObject { + /** + * Open Enum. The reason for the failure. + * + *

One of {@code account_not_configured_as_recipient}, {@code + * fx_rate_drift_exceeded_after_review}, {@code insufficient_funds}, {@code + * payout_method_account_type_incorrect}, {@code payout_method_amount_limit_exceeded}, {@code + * payout_method_canceled_by_customer}, {@code payout_method_closed}, {@code + * payout_method_currency_unsupported}, {@code payout_method_declined}, {@code + * payout_method_does_not_exist}, {@code payout_method_expired}, {@code + * payout_method_holder_address_incorrect}, {@code payout_method_holder_details_incorrect}, + * {@code payout_method_holder_name_incorrect}, {@code payout_method_invalid}, {@code + * payout_method_invalid_account_number}, {@code payout_method_restricted}, {@code + * payout_method_unsupported}, {@code payout_method_usage_frequency_limit_exceeded}, {@code + * recalled}, {@code recipient_capability_not_active}, {@code review_rejected}, or {@code + * unknown_failure}. + */ + @SerializedName("failure_reason") + String failureReason; + } + } + + /** + * Recipient notification settings for the PayoutIntent. Only applicable when the PayoutIntent + * creates an OutboundPayment. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RecipientNotification extends StripeObject { + /** + * Closed Enum. Configuration option to enable or disable notifications to recipients. Do not + * send notifications when {@code setting} is {@code none}. Use the account setting when {@code + * setting} is {@code configured} or omitted. + * + *

One of {@code configured}, or {@code none}. + */ + @SerializedName("setting") + String setting; + } + + /** Recipient verification details for this PayoutIntent. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RecipientVerification extends StripeObject { + /** + * Closed Enum. The recipient-verification provider's match result. + * + *

One of {@code close_match}, {@code match}, {@code no_match}, or {@code unavailable}. + */ + @SerializedName("match_result") + String matchResult; + + /** Details associated with the match result. */ + @SerializedName("match_result_details") + MatchResultDetails matchResultDetails; + + /** Details associated with the match result. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MatchResultDetails extends StripeObject { + /** + * The business type returned by the recipient-verification provider. + * + *

One of {@code business}, or {@code personal}. + */ + @SerializedName("matched_business_type") + String matchedBusinessType; + + /** The account name returned by the recipient-verification provider. */ + @SerializedName("matched_name") + String matchedName; + + /** A message describing the match result. */ + @SerializedName("message") + String message; + + /** + * The business type provided for recipient verification. + * + *

One of {@code business}, or {@code personal}. + */ + @SerializedName("provided_business_type") + String providedBusinessType; + + /** The name associated with the provided recipient. */ + @SerializedName("provided_name") + String providedName; + } + } + + /** + * Scheduling options for the payout. If omitted, the payout is scheduled for immediate execution. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ScheduleOptions extends StripeObject { + /** The date when the payout should be executed, in YYYY-MM-DD format. */ + @SerializedName("execute_on") + String executeOn; + } + + /** Hash containing timestamps of when transitioned to a particular status. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusTransitions extends StripeObject { + /** + * Timestamp describing when a PayoutIntent changed status to {@code canceled}. Represented as a + * RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("canceled_at") + Instant canceledAt; + + /** + * Timestamp describing when a PayoutIntent changed status to {@code posted}. Represented as a + * RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("posted_at") + Instant postedAt; + + /** + * Timestamp describing when a PayoutIntent changed status to {@code processing}. Represented as + * a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("processing_at") + Instant processingAt; + + /** + * Timestamp describing when a PayoutIntent changed status to {@code requires_action}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("requires_action_at") + Instant requiresActionAt; + } + + /** To which payout method the payout is sent. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class To extends StripeObject { + /** Estimated amount to be credited to the recipient in the destination currency. */ + @SerializedName("credited") + Amount credited; + + /** The currency to send to the recipient. */ + @SerializedName("currency") + String currency; + + /** + * The payout method ID for the PayoutIntent. Optional when the PayoutIntent creates an + * OutboundPayment and the recipient has a default payout method. Required when the PayoutIntent + * creates an OutboundTransfer. + */ + @SerializedName("payout_method") + String payoutMethod; + + /** Payout method options for the PayoutIntent. */ + @SerializedName("payout_method_options") + PayoutMethodOptions payoutMethodOptions; + + /** The recipient ID for the PayoutIntent. */ + @SerializedName("recipient") + String recipient; + + /** Payout method options for the PayoutIntent. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayoutMethodOptions extends StripeObject { + /** Options for bank account payout methods. */ + @SerializedName("bank_account") + BankAccount bankAccount; + + /** Options for bank account payout methods. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankAccount extends StripeObject { + /** Per-network configuration options. */ + @SerializedName("preferred_network_options") + PreferredNetworkOptions preferredNetworkOptions; + + /** The preferred networks to use for this PayoutIntent. */ + @SerializedName("preferred_networks") + List preferredNetworks; + + /** Per-network configuration options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PreferredNetworkOptions extends StripeObject { + /** ACH-specific network options. */ + @SerializedName("ach") + Ach ach; + + /** ACH-specific network options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Ach extends StripeObject { + /** + * Open Enum. ACH submission timing. + * + *

One of {@code next_day}, or {@code same_day}. + */ + @SerializedName("submission") + String submission; + + /** + * The transaction purpose for this ACH payment. + * + *

Equal to {@code payroll}. + */ + @SerializedName("transaction_purpose") + String transactionPurpose; + } + } + } + } + } +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java new file mode 100644 index 000000000000..82fe7c714bfb --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java @@ -0,0 +1,195 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import java.util.List; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** Use the PayoutMethods API to list and interact with PayoutMethod objects. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class PayoutMethod extends StripeObject implements HasId { + /** + * Whether the payout method was archived. Payout methods can be archived through the /archive + * API, and they will not be automatically archived by Stripe. Archived payout methods cannot be + * used for outbound money movement. + */ + @SerializedName("archived") + Boolean archived; + + /** The PayoutMethodBankAccount object details. */ + @SerializedName("bank_account") + BankAccount bankAccount; + + /** The PayoutMethodCard object details. */ + @SerializedName("card") + Card card; + + /** Created timestamp. */ + @SerializedName("created") + Instant created; + + /** ID of the PayoutMethod object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** ID of the underlying active OutboundSetupIntent object, if any. */ + @SerializedName("latest_outbound_setup_intent") + String latestOutboundSetupIntent; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.payout_method}. + */ + @SerializedName("object") + String object; + + /** + * Whether the Payout Method is currently unusable for money movement, despite potentially being + * correctly set up. Please reach out to Stripe Support for more information. + */ + @SerializedName("restricted") + Boolean restricted; + + /** + * Open Enum. The type of payout method. + * + *

One of {@code bank_account}, or {@code card}. + */ + @SerializedName("type") + String type; + + /** + * Indicates whether the payout method has met the necessary requirements for outbound money + * movement. + */ + @SerializedName("usage_status") + UsageStatus usageStatus; + + /** The PayoutMethodBankAccount object details. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankAccount extends StripeObject { + /** + * The type of bank account (checking or savings). + * + *

One of {@code checking}, {@code futsu}, {@code savings}, or {@code toza}. + */ + @SerializedName("bank_account_type") + String bankAccountType; + + /** + * The name of the bank this bank account is in. This field is populated automatically by + * Stripe. + */ + @SerializedName("bank_name") + String bankName; + + /** The branch number of the bank account, if present. */ + @SerializedName("branch_number") + String branchNumber; + + /** The country code of the bank account. */ + @SerializedName("country") + String country; + + /** The ID of the Financial Connections Account used to create the bank account. */ + @SerializedName("financial_connections_account") + String financialConnectionsAccount; + + /** The last 4 digits of the account number. */ + @SerializedName("last4") + String last4; + + /** The routing number of the bank account, if present. */ + @SerializedName("routing_number") + String routingNumber; + + /** The list of currencies supported by this bank account. */ + @SerializedName("supported_currencies") + List supportedCurrencies; + + /** The swift code of the bank or financial institution. */ + @SerializedName("swift_code") + String swiftCode; + } + + /** The PayoutMethodCard object details. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** The month the card expires. */ + @SerializedName("exp_month") + String expMonth; + + /** The year the card expires. */ + @SerializedName("exp_year") + String expYear; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether + * two recipients who've signed up with you are using the same card number, for example. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** The last 4 digits of the card number. */ + @SerializedName("last4") + String last4; + + /** The list of currencies supported by this bank account. */ + @SerializedName("supported_currencies") + List supportedCurrencies; + } + + /** + * Indicates whether the payout method has met the necessary requirements for outbound money + * movement. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UsageStatus extends StripeObject { + /** + * Payments status - used when sending OutboundPayments (sending funds to recipients). If + * disabled, enable the payout method by creating an OutboundSetupIntent using {@code + * POST /v2/money_management/outbound_setup_intents}. + * + *

One of {@code disabled}, {@code eligible}, {@code ineligible}, {@code invalid}, or {@code + * requires_action}. + */ + @SerializedName("payments") + String payments; + + /** + * Transfers status - used when making an OutboundTransfer (sending funds to yourself). If + * disabled, enable the payout method by creating an OutboundSetupIntent using {@code + * POST /v2/money_management/outbound_setup_intents}. + * + *

One of {@code disabled}, {@code eligible}, {@code ineligible}, {@code invalid}, or {@code + * requires_action}. + */ + @SerializedName("transfers") + String transfers; + } +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethodsBankAccountSpec.java b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethodsBankAccountSpec.java new file mode 100644 index 000000000000..70c296bc5569 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethodsBankAccountSpec.java @@ -0,0 +1,107 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.StripeObject; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** The PayoutMethodsBankAccountSpec object. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class PayoutMethodsBankAccountSpec extends StripeObject { + /** The list of specs by country. */ + @SerializedName("countries") + Map countries; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.payout_methods_bank_account_spec}. + */ + @SerializedName("object") + String object; + + /** + * For more details about Country, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Country extends StripeObject { + /** The list of fields for a country, along with associated information. */ + @SerializedName("fields") + List fields; + + /** + * For more details about Field, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Field extends StripeObject { + /** + * The currencies supported by the corresponding credentials for bank accounts in the + * specified country. + */ + @SerializedName("currencies") + List currencies; + + /** The local name of the field. */ + @SerializedName("local_name") + String localName; + + /** The human readable local name of the field. */ + @SerializedName("local_name_human") + LocalNameHuman localNameHuman; + + /** The maximum length of the field. */ + @SerializedName("max_length") + Long maxLength; + + /** THe minimum length of the field. */ + @SerializedName("min_length") + Long minLength; + + /** The placeholder value of the field. */ + @SerializedName("placeholder") + String placeholder; + + /** The stripe name of the field. */ + @SerializedName("stripe_name") + String stripeName; + + /** The validation regex of the field. */ + @SerializedName("validation_regex") + String validationRegex; + + /** The human readable local name of the field. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LocalNameHuman extends StripeObject { + /** The default content of the localizable string. */ + @SerializedName("content") + String content; + + /** A unique key representing the instance of this localizable string. */ + @SerializedName("localization_key") + String localizationKey; + } + } + } +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java new file mode 100644 index 000000000000..ab6c90d6c938 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java @@ -0,0 +1,378 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +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; +import lombok.Setter; + +/** + * Use ReceivedCredits API to retrieve information on when, where, and how funds are sent into your + * FinancialAccount. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class ReceivedCredit extends StripeObject implements HasId { + /** The amount and currency credited to the FinancialAccount. */ + @SerializedName("amount") + Amount amount; + + /** + * The amount and currency Stripe received from the external source, before any conversion or + * fees. + */ + @SerializedName("amount_received") + Amount amountReceived; + + /** + * This object stores details about the originating Stripe transaction that resulted in the + * ReceivedCredit. Present if {@code type} field value is {@code balance_transfer}. + */ + @SerializedName("balance_transfer") + BalanceTransfer balanceTransfer; + + /** + * This object stores details about the originating banking transaction that resulted in the + * ReceivedCredit. Present if {@code type} field value is {@code bank_transfer}. + */ + @SerializedName("bank_transfer") + BankTransfer bankTransfer; + + /** + * Time at which the ReceivedCredit was created. Represented as a RFC 3339 date & time UTC + * value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("created") + Instant created; + + /** Freeform string set by originator of the ReceivedCredit. */ + @SerializedName("description") + String description; + + /** Financial Account ID on which funds for ReceivedCredit were received. */ + @SerializedName("financial_account") + String financialAccount; + + /** Unique identifier for the ReceivedCredit. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.received_credit}. + */ + @SerializedName("object") + String object; + + /** + * Open Enum. The status of the ReceivedCredit. + * + *

One of {@code failed}, {@code pending}, {@code returned}, or {@code succeeded}. + */ + @SerializedName("status") + String status; + + /** + * 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}. + */ + @SerializedName("status_details") + StatusDetails statusDetails; + + /** Hash containing timestamps of when the object transitioned to a particular status. */ + @SerializedName("status_transitions") + StatusTransitions statusTransitions; + + /** + * Open Enum. The type of flow that caused the ReceivedCredit. + * + *

One of {@code balance_transfer}, or {@code bank_transfer}. + */ + @SerializedName("type") + String type; + + /** + * This object stores details about the originating Stripe transaction that resulted in the + * ReceivedCredit. Present if {@code type} field value is {@code balance_transfer}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BalanceTransfer extends StripeObject { + /** The ID of the account that owns the source object originated the ReceivedCredit. */ + @SerializedName("from_account") + String fromAccount; + + /** The ID of the outbound payment object that originated the ReceivedCredit. */ + @SerializedName("outbound_payment") + String outboundPayment; + + /** The ID of the outbound transfer object that originated the ReceivedCredit. */ + @SerializedName("outbound_transfer") + String outboundTransfer; + + /** The ID of the payout object that originated the ReceivedCredit. */ + @SerializedName("payout") + String payout; + + /** The ID of the v1 transfer object that originated the ReceivedCredit. */ + @SerializedName("transfer") + String transfer; + + /** + * Open Enum. The type of Stripe Money Movement that originated the ReceivedCredit. + * + *

One of {@code outbound_payment}, {@code outbound_transfer}, {@code payout}, or {@code + * transfer}. + */ + @SerializedName("type") + String type; + } + + /** + * This object stores details about the originating banking transaction that resulted in the + * ReceivedCredit. Present if {@code type} field value is {@code bank_transfer}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankTransfer extends StripeObject { + /** Financial Address on which funds for ReceivedCredit were received. */ + @SerializedName("financial_address") + String financialAddress; + + /** + * The money transmission network used to send funds for this ReceivedCredit. + * + *

One of {@code ach}, {@code chaps}, {@code fedwire}, {@code fps}, {@code rtp}, {@code + * sepa}, or {@code sepa_instant}. + */ + @SerializedName("network") + String network; + + /** Hash containing the originating bank account details and type for this bank transfer. */ + @SerializedName("originating_bank_account") + OriginatingBankAccount originatingBankAccount; + + /** Freeform string set by originator of the external ReceivedCredit. */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + /** Hash containing the originating bank account details and type for this bank transfer. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class OriginatingBankAccount extends StripeObject { + /** + * Hash containing the transaction bank details. Present if {@code type} field value is {@code + * aba}. + */ + @SerializedName("aba") + Aba aba; + + /** + * Hash containing the transaction bank details. Present if {@code type} field value is {@code + * iban}. + */ + @SerializedName("iban") + Iban iban; + + /** + * Hash containing the transaction bank details. Present if {@code type} field value is {@code + * sort_code}. + */ + @SerializedName("sort_code") + SortCode sortCode; + + /** + * Open Enum. The type of bank transfer that originated this ReceivedCredit. + * + *

One of {@code aba}, {@code iban}, or {@code sort_code}. + */ + @SerializedName("type") + String type; + + /** + * Hash containing the transaction bank details. Present if {@code type} field value is {@code + * aba}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Aba extends StripeObject { + /** The name of the account holder that sent the payment. */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** The bank name the transfer was received from. */ + @SerializedName("bank_name") + String bankName; + + /** The last 4 digits of the account number that originated the transfer. */ + @SerializedName("last4") + String last4; + + /** The routing number of the account that originated the transfer. */ + @SerializedName("routing_number") + String routingNumber; + } + + /** + * Hash containing the transaction bank details. Present if {@code type} field value is {@code + * iban}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Iban extends StripeObject { + /** The account holder name of the bank account the transfer was received from. */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** The bank name the transfer was received from. */ + @SerializedName("bank_name") + String bankName; + + /** The BIC/SWIFT code of the account that originated the transfer. */ + @SerializedName("bic") + String bic; + + /** The origination country of the bank transfer. */ + @SerializedName("country") + String country; + + /** The IBAN that originated the transfer. */ + @SerializedName("iban") + String iban; + } + + /** + * Hash containing the transaction bank details. Present if {@code type} field value is {@code + * sort_code}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SortCode extends StripeObject { + /** The account holder name of the bank account the transfer was received from. */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** The bank name the transfer was received from. */ + @SerializedName("bank_name") + String bankName; + + /** The last 4 digits of the account number that originated the transfer. */ + @SerializedName("last4") + String last4; + + /** The sort code of the account that originated the transfer. */ + @SerializedName("sort_code") + String sortCode; + } + } + } + + /** + * 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}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetails extends StripeObject { + /** + * Hash that provides additional information regarding the reason behind a {@code failed} + * ReceivedCredit status. It is only present when the ReceivedCredit status is {@code failed}. + */ + @SerializedName("failed") + Failed failed; + + /** + * Hash that provides additional information regarding the reason behind a {@code returned} + * ReceivedCredit status. It is only present when the ReceivedCredit status is {@code returned}. + */ + @SerializedName("returned") + Returned returned; + + /** + * Hash that provides additional information regarding the reason behind a {@code failed} + * ReceivedCredit status. It is only present when the ReceivedCredit status is {@code failed}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Failed extends StripeObject { + /** + * Open Enum. The {@code failed} status reason. + * + *

One of {@code capability_inactive}, {@code currency_unsupported_on_financial_address}, + * {@code financial_address_inactive}, or {@code stripe_rejected}. + */ + @SerializedName("reason") + String reason; + } + + /** + * Hash that provides additional information regarding the reason behind a {@code returned} + * ReceivedCredit status. It is only present when the ReceivedCredit status is {@code returned}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Returned extends StripeObject { + /** + * Open Enum. The {@code returned} status reason. + * + *

Equal to {@code originator_initiated_reversal}. + */ + @SerializedName("reason") + String reason; + } + } + + /** Hash containing timestamps of when the object transitioned to a particular status. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusTransitions extends StripeObject { + /** + * Timestamp describing when the ReceivedCredit was marked as {@code failed}. Represented as a + * RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("failed_at") + Instant failedAt; + + /** + * Timestamp describing when the ReceivedCredit changed status to {@code returned}. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("returned_at") + Instant returnedAt; + + /** + * Timestamp describing when the ReceivedCredit was marked as {@code succeeded}. Represented as + * a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("succeeded_at") + Instant succeededAt; + } +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/RecipientVerification.java b/src/main/java/com/stripe/model/v2/moneymanagement/RecipientVerification.java new file mode 100644 index 000000000000..6ba66ff9cada --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/RecipientVerification.java @@ -0,0 +1,178 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** RecipientVerification represents a verification of recipient you intend to send funds to. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class RecipientVerification extends StripeObject implements HasId { + /** The resource that consumed this verification. */ + @SerializedName("consumed_by") + ConsumedBy consumedBy; + + /** + * Time at which the RecipientVerification was created. Represented as a RFC 3339 date & time + * UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("created") + Instant created; + + /** + * Time at which the RecipientVerification expires, 5 minutes after the creation. Only applicable + * for Verification of Payee (VoP) verifications. Represented as a RFC 3339 date & time UTC + * value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("expires_at") + Instant expiresAt; + + /** The ID of the RecipientVerification. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * Closed Enum. Match level of the RecipientVerification: {@code match}, {@code close_match}, + * {@code no_match}, {@code unavailable}. + * + *

One of {@code close_match}, {@code match}, {@code no_match}, or {@code unavailable}. + */ + @SerializedName("match_result") + String matchResult; + + /** Details for the match result. */ + @SerializedName("match_result_details") + MatchResultDetails matchResultDetails; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.recipient_verification}. + */ + @SerializedName("object") + String object; + + /** ID of the payout method that was verified. */ + @SerializedName("payout_method") + String payoutMethod; + + /** ID of the recipient account. Omitted for same-entity payouts. */ + @SerializedName("recipient") + String recipient; + + /** + * Current status of the recipient verification. + * + *

One of {@code acknowledged}, {@code awaiting_acknowledgement}, {@code consumed}, {@code + * expired}, or {@code verified}. + */ + @SerializedName("status") + String status; + + /** Hash containing timestamps of when the object transitioned to a particular status. */ + @SerializedName("status_transitions") + StatusTransitions statusTransitions; + + /** + * Open Enum. The type of verification performed: {@code verification_of_payee}, {@code + * confirmation_of_payee}. + * + *

One of {@code confirmation_of_payee}, or {@code verification_of_payee}. + */ + @SerializedName("verification_type") + String verificationType; + + /** The resource that consumed this verification. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ConsumedBy extends StripeObject { + /** The ID of the OutboundPayment that consumed the RecipientVerification. */ + @SerializedName("outbound_payment") + String outboundPayment; + + /** + * The type of resource that consumed the RecipientVerification. + * + *

Equal to {@code outbound_payment}. + */ + @SerializedName("type") + String type; + } + + /** Details for the match result. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MatchResultDetails extends StripeObject { + /** + * The business type matched by the provider. Only present for Confirmation of Payee (CoP) + * verifications. + * + *

One of {@code business}, or {@code personal}. + */ + @SerializedName("matched_business_type") + String matchedBusinessType; + + /** + * The account name associated with the bank account as provided by the VoP provider, only + * present if there is a match or close match. + */ + @SerializedName("matched_name") + String matchedName; + + /** A message describing the match result. */ + @SerializedName("message") + String message; + + /** + * The business type provided by the user. Only present for Confirmation of Payee (CoP) + * verifications. + * + *

One of {@code business}, or {@code personal}. + */ + @SerializedName("provided_business_type") + String providedBusinessType; + + /** The name associated with the provided recipient. */ + @SerializedName("provided_name") + String providedName; + } + + /** Hash containing timestamps of when the object transitioned to a particular status. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusTransitions extends StripeObject { + /** + * Timestamp describing when a RecipientVerification changed status to {@code acknowledged}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("acknowledged_at") + Instant acknowledgedAt; + + /** + * Timestamp describing when a RecipientVerification changed status to {@code consumed}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("consumed_at") + Instant consumedAt; + } +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java b/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java new file mode 100644 index 000000000000..d3d036597af5 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/Transaction.java @@ -0,0 +1,261 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +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; +import lombok.Getter; +import lombok.Setter; + +/** + * A Transaction records how a money movement flow affects your FinancialAccount balance. A flow can + * create one or more Transactions. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class Transaction extends StripeObject implements HasId { + /** The amount of the Transaction. */ + @SerializedName("amount") + Amount amount; + + /** + * The change to the FinancialAccount's balance. This is the sum of the balance impacts of this + * Transaction's TransactionEntries with {@code effective_at} timestamps in the past. + */ + @SerializedName("balance_impact") + BalanceImpact balanceImpact; + + /** + * Open Enum. A category used to classify the Transaction. + * + *

One of {@code adjustment}, {@code currency_conversion}, {@code inbound_transfer}, {@code + * inbound_transfer_reversal}, {@code outbound_payment}, {@code outbound_payment_reversal}, {@code + * outbound_transfer}, {@code outbound_transfer_reversal}, {@code received_credit}, {@code + * received_credit_reversal}, {@code received_debit}, {@code received_debit_reversal}, {@code + * stripe_fee}, or {@code stripe_fee_tax}. + */ + @SerializedName("category") + String category; + + /** Details about the counterparty to this Transaction. */ + @SerializedName("counterparty") + Counterparty counterparty; + + /** + * Time at which the object was created. Represented as an RFC 3339 timestamp in UTC with + * millisecond precision, for example {@code 2022-09-18T13:22:18.123Z}. + */ + @SerializedName("created") + Instant created; + + /** + * A description of the Transaction. When applicable, the description is copied from the flow + * object when the Transaction is created. You can update it using the Update Transaction + * endpoint. + */ + @SerializedName("description") + String description; + + /** The ID of the FinancialAccount affected by this Transaction. */ + @SerializedName("financial_account") + String financialAccount; + + /** + * Details about the flow object that created the Transaction, such as an InboundTransfer or + * OutboundPayment. {@code flow.type} identifies the kind of object. The corresponding field + * contains its ID, when available: for an InboundTransfer, {@code flow.inbound_transfer} contains + * the InboundTransfer's ID. Pass that ID to the {@code flow} parameter on List Transactions. + */ + @SerializedName("flow") + Flow flow; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.transaction}. + */ + @SerializedName("object") + String object; + + /** + * Hosted transaction receipt that is provided when money movement is considered regulated under + * Stripe's money transmission licenses. If not applicable, {@code regulatory_receipt.status} will + * be {@code not_applicable} and no URL will be provided unless you opt in by calling {@code + * /refresh_regulatory_receipt}. + */ + @SerializedName("regulatory_receipt") + RegulatoryReceipt regulatoryReceipt; + + /** + * Closed Enum. The current status of the Transaction. A Transaction is {@code pending} if either + * {@code balance_impact.inbound_pending} or {@code balance_impact.outbound_pending} is non-zero. + * A Transaction is {@code posted} if only {@code balance_impact.available} is non-zero. A + * Transaction is {@code void} if there is no balance impact. {@code posted} and {@code void} are + * terminal states, and no additional TransactionEntries will be added to the Transaction. + * + *

One of {@code pending}, {@code posted}, or {@code void}. + */ + @SerializedName("status") + String status; + + /** Timestamps for when the Transaction transitioned to each status. */ + @SerializedName("status_transitions") + StatusTransitions statusTransitions; + + /** + * The change to the FinancialAccount's balance. This is the sum of the balance impacts of this + * Transaction's TransactionEntries with {@code effective_at} timestamps in the past. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BalanceImpact extends StripeObject { + /** The change to the available balance. */ + @SerializedName("available") + Amount available; + + /** The change to the {@code inbound_pending} balance. */ + @SerializedName("inbound_pending") + Amount inboundPending; + + /** The change to the {@code outbound_pending} balance. */ + @SerializedName("outbound_pending") + Amount outboundPending; + } + + /** Details about the counterparty to this Transaction. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Counterparty extends StripeObject { + /** Name of the counterparty. */ + @SerializedName("name") + String name; + } + + /** + * Details about the flow object that created the Transaction, such as an InboundTransfer or + * OutboundPayment. {@code flow.type} identifies the kind of object. The corresponding field + * contains its ID, when available: for an InboundTransfer, {@code flow.inbound_transfer} contains + * the InboundTransfer's ID. Pass that ID to the {@code flow} parameter on List Transactions. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Flow extends StripeObject { + /** If applicable, the ID of the Adjustment that created this Transaction. */ + @SerializedName("adjustment") + String adjustment; + + /** When available, the ID of the CurrencyConversion that created this Transaction. */ + @SerializedName("currency_conversion") + String currencyConversion; + + /** If applicable, the ID of the FeeBatch that created this Transaction. */ + @SerializedName("fee_batch") + String feeBatch; + + /** If applicable, the ID of the InboundTransfer that created this Transaction. */ + @SerializedName("inbound_transfer") + String inboundTransfer; + + /** If applicable, the ID of the OutboundPayment that created this Transaction. */ + @SerializedName("outbound_payment") + String outboundPayment; + + /** If applicable, the ID of the OutboundTransfer that created this Transaction. */ + @SerializedName("outbound_transfer") + String outboundTransfer; + + /** If applicable, the ID of the ReceivedCredit that created this Transaction. */ + @SerializedName("received_credit") + String receivedCredit; + + /** If applicable, the ID of the ReceivedDebit that created this Transaction. */ + @SerializedName("received_debit") + String receivedDebit; + + /** + * Open Enum. The type of flow that created the Transaction. When available, the flow's ID is + * provided in the corresponding field. + * + *

One of {@code adjustment}, {@code currency_conversion}, {@code fee_batch}, {@code + * inbound_transfer}, {@code outbound_payment}, {@code outbound_transfer}, {@code + * received_credit}, or {@code received_debit}. + */ + @SerializedName("type") + String type; + } + + /** + * Hosted transaction receipt that is provided when money movement is considered regulated under + * Stripe's money transmission licenses. If not applicable, {@code regulatory_receipt.status} will + * be {@code not_applicable} and no URL will be provided unless you opt in by calling {@code + * /refresh_regulatory_receipt}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RegulatoryReceipt extends StripeObject { + /** + * Current availability of the regulatory receipt. + * + *

One of {@code available}, {@code not_applicable}, {@code pending}, or {@code url_expired}. + */ + @SerializedName("status") + String status; + + /** Hosted URL for the receipt. */ + @SerializedName("url") + String url; + + /** Time until which {@code url} is valid. */ + @SerializedName("url_expires_at") + Instant urlExpiresAt; + } + + /** Timestamps for when the Transaction transitioned to each status. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusTransitions extends StripeObject { + /** + * The time at which the Transaction became {@code posted}. Only present when {@code status} is + * {@code posted}. + */ + @SerializedName("posted_at") + Instant postedAt; + + /** + * The time at which the Transaction became {@code void}. Only present when {@code status} is + * {@code void}. + */ + @SerializedName("void_at") + Instant voidAt; + } +} diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java b/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java new file mode 100644 index 000000000000..fad6fe9d1149 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/TransactionEntry.java @@ -0,0 +1,177 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +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; +import lombok.Setter; + +/** TransactionEntries model funds moving between availability states for a given Transaction. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class TransactionEntry extends StripeObject implements HasId { + /** + * The change to the FinancialAccount's balance that takes effect at this TransactionEntry's + * {@code effective_at} timestamp. + */ + @SerializedName("balance_impact") + BalanceImpact balanceImpact; + + /** + * Time at which the object was created. Represented as an RFC 3339 timestamp in UTC with + * millisecond precision, for example {@code 2022-09-18T13:22:18.123Z}. + */ + @SerializedName("created") + Instant created; + + /** + * Time at which the TransactionEntry affects the FinancialAccount balance. This can be in the + * past or future. + */ + @SerializedName("effective_at") + Instant effectiveAt; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.transaction_entry}. + */ + @SerializedName("object") + String object; + + /** The ID of the Transaction that this TransactionEntry belongs to. */ + @SerializedName("transaction") + String transaction; + + /** Details copied from the Transaction that this TransactionEntry belongs to. */ + @SerializedName("transaction_details") + TransactionDetails transactionDetails; + + /** + * The change to the FinancialAccount's balance that takes effect at this TransactionEntry's + * {@code effective_at} timestamp. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BalanceImpact extends StripeObject { + /** The change to the available balance. */ + @SerializedName("available") + Amount available; + + /** The change to the {@code inbound_pending} balance. */ + @SerializedName("inbound_pending") + Amount inboundPending; + + /** The change to the {@code outbound_pending} balance. */ + @SerializedName("outbound_pending") + Amount outboundPending; + } + + /** Details copied from the Transaction that this TransactionEntry belongs to. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TransactionDetails extends StripeObject { + /** + * Open Enum. The category of this TransactionEntry's parent Transaction. + * + *

One of {@code adjustment}, {@code currency_conversion}, {@code inbound_transfer}, {@code + * inbound_transfer_reversal}, {@code outbound_payment}, {@code outbound_payment_reversal}, + * {@code outbound_transfer}, {@code outbound_transfer_reversal}, {@code received_credit}, + * {@code received_credit_reversal}, {@code received_debit}, {@code received_debit_reversal}, + * {@code stripe_fee}, or {@code stripe_fee_tax}. + */ + @SerializedName("category") + String category; + + /** The ID of the FinancialAccount affected by this Transaction. */ + @SerializedName("financial_account") + String financialAccount; + + /** + * Details about the flow object that created the Transaction this entry belongs to, such as an + * InboundTransfer or OutboundPayment. {@code transaction_details.flow.type} identifies the kind + * of object. The corresponding field contains its ID, when available: for an InboundTransfer, + * {@code transaction_details.flow.inbound_transfer} contains the InboundTransfer's ID. To list + * entries for the parent Transaction, pass the TransactionEntry's {@code transaction} ID to the + * {@code transaction} parameter on List Transaction Entries. + */ + @SerializedName("flow") + Flow flow; + + /** + * Details about the flow object that created the Transaction this entry belongs to, such as an + * InboundTransfer or OutboundPayment. {@code transaction_details.flow.type} identifies the kind + * of object. The corresponding field contains its ID, when available: for an InboundTransfer, + * {@code transaction_details.flow.inbound_transfer} contains the InboundTransfer's ID. To list + * entries for the parent Transaction, pass the TransactionEntry's {@code transaction} ID to the + * {@code transaction} parameter on List Transaction Entries. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Flow extends StripeObject { + /** If applicable, the ID of the Adjustment that created this Transaction. */ + @SerializedName("adjustment") + String adjustment; + + /** When available, the ID of the CurrencyConversion that created this Transaction. */ + @SerializedName("currency_conversion") + String currencyConversion; + + /** If applicable, the ID of the FeeBatch that created this Transaction. */ + @SerializedName("fee_batch") + String feeBatch; + + /** If applicable, the ID of the InboundTransfer that created this Transaction. */ + @SerializedName("inbound_transfer") + String inboundTransfer; + + /** If applicable, the ID of the OutboundPayment that created this Transaction. */ + @SerializedName("outbound_payment") + String outboundPayment; + + /** If applicable, the ID of the OutboundTransfer that created this Transaction. */ + @SerializedName("outbound_transfer") + String outboundTransfer; + + /** If applicable, the ID of the ReceivedCredit that created this Transaction. */ + @SerializedName("received_credit") + String receivedCredit; + + /** If applicable, the ID of the ReceivedDebit that created this Transaction. */ + @SerializedName("received_debit") + String receivedDebit; + + /** + * Open Enum. The type of flow that created the Transaction. When available, the flow's ID is + * provided in the corresponding field. + * + *

One of {@code adjustment}, {@code currency_conversion}, {@code fee_batch}, {@code + * inbound_transfer}, {@code outbound_payment}, {@code outbound_transfer}, {@code + * received_credit}, or {@code received_debit}. + */ + @SerializedName("type") + String type; + } + } +} diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index 19c33bcaa03f..5c21c35af4e3 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -60,7 +60,10 @@ public class AccountCreateParams extends ApiRequestParams { @SerializedName("company") Company company; - /** A hash of configuration describing the account controller's attributes. */ + /** + * Configures the account's Dashboard access, loss liability, requirements collection, and Stripe + * fee responsibility. + */ @SerializedName("controller") Controller controller; @@ -347,7 +350,10 @@ public Builder setCompany(AccountCreateParams.Company company) { return this; } - /** A hash of configuration describing the account controller's attributes. */ + /** + * Configures the account's Dashboard access, loss liability, requirements collection, and + * Stripe fee responsibility. + */ public Builder setController(AccountCreateParams.Controller controller) { this.controller = controller; return this; @@ -1597,6 +1603,10 @@ public static class Capabilities { @SerializedName("us_bank_transfer_payments") UsBankTransferPayments usBankTransferPayments; + /** The wero_payments capability. */ + @SerializedName("wero_payments") + WeroPayments weroPayments; + /** The zip_payments capability. */ @SerializedName("zip_payments") ZipPayments zipPayments; @@ -1671,6 +1681,7 @@ private Capabilities( UpiPayments upiPayments, UsBankAccountAchPayments usBankAccountAchPayments, UsBankTransferPayments usBankTransferPayments, + WeroPayments weroPayments, ZipPayments zipPayments) { this.acssDebitPayments = acssDebitPayments; this.affirmPayments = affirmPayments; @@ -1741,6 +1752,7 @@ private Capabilities( this.upiPayments = upiPayments; this.usBankAccountAchPayments = usBankAccountAchPayments; this.usBankTransferPayments = usBankTransferPayments; + this.weroPayments = weroPayments; this.zipPayments = zipPayments; } @@ -1887,6 +1899,8 @@ public static class Builder { private UsBankTransferPayments usBankTransferPayments; + private WeroPayments weroPayments; + private ZipPayments zipPayments; /** Finalize and obtain parameter instance from this builder. */ @@ -1961,6 +1975,7 @@ public AccountCreateParams.Capabilities build() { this.upiPayments, this.usBankAccountAchPayments, this.usBankTransferPayments, + this.weroPayments, this.zipPayments); } @@ -2453,6 +2468,12 @@ public Builder setUsBankTransferPayments( return this; } + /** The wero_payments capability. */ + public Builder setWeroPayments(AccountCreateParams.Capabilities.WeroPayments weroPayments) { + this.weroPayments = weroPayments; + return this; + } + /** The zip_payments capability. */ public Builder setZipPayments(AccountCreateParams.Capabilities.ZipPayments zipPayments) { this.zipPayments = zipPayments; @@ -7893,6 +7914,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class WeroPayments { + /** + * 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; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private WeroPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Capabilities.WeroPayments build() { + return new AccountCreateParams.Capabilities.WeroPayments( + this.extraParams, this.requested); + } + + /** + * 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.Capabilities.WeroPayments#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.Capabilities.WeroPayments#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ZipPayments { @@ -8079,6 +8180,10 @@ public static class Company { @SerializedName("phone") String phone; + /** A location where the business has a meaningful physical operating presence. */ + @SerializedName("physical_address") + PhysicalAddress physicalAddress; + /** The primary location where the business conducts operations. */ @SerializedName("principal_place_of_business") PrincipalPlaceOfBusiness principalPlaceOfBusiness; @@ -8155,6 +8260,7 @@ private Company( OwnershipDeclaration ownershipDeclaration, ApiRequestParams.EnumParam ownershipExemptionReason, String phone, + PhysicalAddress physicalAddress, PrincipalPlaceOfBusiness principalPlaceOfBusiness, Object registrationDate, String registrationNumber, @@ -8181,6 +8287,7 @@ private Company( this.ownershipDeclaration = ownershipDeclaration; this.ownershipExemptionReason = ownershipExemptionReason; this.phone = phone; + this.physicalAddress = physicalAddress; this.principalPlaceOfBusiness = principalPlaceOfBusiness; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; @@ -8231,6 +8338,8 @@ public static class Builder { private String phone; + private PhysicalAddress physicalAddress; + private PrincipalPlaceOfBusiness principalPlaceOfBusiness; private Object registrationDate; @@ -8269,6 +8378,7 @@ public AccountCreateParams.Company build() { this.ownershipDeclaration, this.ownershipExemptionReason, this.phone, + this.physicalAddress, this.principalPlaceOfBusiness, this.registrationDate, this.registrationNumber, @@ -8449,6 +8559,13 @@ public Builder setPhone(String phone) { return this; } + /** A location where the business has a meaningful physical operating presence. */ + public Builder setPhysicalAddress( + AccountCreateParams.Company.PhysicalAddress physicalAddress) { + this.physicalAddress = physicalAddress; + return this; + } + /** The primary location where the business conducts operations. */ public Builder setPrincipalPlaceOfBusiness( AccountCreateParams.Company.PrincipalPlaceOfBusiness principalPlaceOfBusiness) { @@ -9414,6 +9531,168 @@ public Builder setUserAgent(String userAgent) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PhysicalAddress { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * 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; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @SerializedName("state") + String state; + + private PhysicalAddress( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Company.PhysicalAddress build() { + return new AccountCreateParams.Company.PhysicalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + 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.Company.PhysicalAddress#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.Company.PhysicalAddress#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class PrincipalPlaceOfBusiness { @@ -10198,10 +10477,13 @@ public static class Fees { Map extraParams; /** - * A value indicating the responsible payer of Stripe fees on this account. Defaults to {@code + * Controls who pays Stripe fees for direct charges and other pricing-control-eligible Stripe + * products. Setting {@code controller.losses.payments=application} requires {@code + * controller.fees.payer=application}. For destination charges and separate charges and + * transfers, Stripe bills the platform regardless of this setting. Defaults to {@code * account}. Learn more about fee behavior on - * connected accounts. + * connected accounts, including application fees and pricing considerations. */ @SerializedName("payer") Payer payer; @@ -10254,10 +10536,13 @@ public Builder putAllExtraParam(Map map) { } /** - * A value indicating the responsible payer of Stripe fees on this account. Defaults to - * {@code account}. Learn more about fee behavior on - * connected accounts. + * connected accounts, including application fees and pricing considerations. */ public Builder setPayer(AccountCreateParams.Controller.Fees.Payer payer) { this.payer = payer; @@ -10294,8 +10579,11 @@ public static class Losses { Map extraParams; /** - * A value indicating who is liable when this account can't pay back negative balances - * resulting from payments. Defaults to {@code stripe}. + * Controls who is responsible for payment-related negative balances on this account. The + * platform remains liable for negative balances on its own account. To use Stripe negative + * balance liability, your integration must meet Managed Risk + * requirements. Defaults to {@code stripe}. */ @SerializedName("payments") Payments payments; @@ -10348,8 +10636,11 @@ public Builder putAllExtraParam(Map map) { } /** - * A value indicating who is liable when this account can't pay back negative balances - * resulting from payments. Defaults to {@code stripe}. + * Controls who is responsible for payment-related negative balances on this account. The + * platform remains liable for negative balances on its own account. To use Stripe negative + * balance liability, your integration must meet Managed Risk + * requirements. Defaults to {@code stripe}. */ public Builder setPayments(AccountCreateParams.Controller.Losses.Payments payments) { this.payments = payments; @@ -10541,6 +10832,10 @@ public static class Documents { @SerializedName("proof_of_address") ProofOfAddress proofOfAddress; + /** One or more documents that demonstrate proof of business presence. */ + @SerializedName("proof_of_business_presence") + ProofOfBusinessPresence proofOfBusinessPresence; + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ @SerializedName("proof_of_ultimate_beneficial_ownership") ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; @@ -10554,6 +10849,7 @@ private Documents( CompanyTaxIdVerification companyTaxIdVerification, Map extraParams, ProofOfAddress proofOfAddress, + ProofOfBusinessPresence proofOfBusinessPresence, ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; this.companyLicense = companyLicense; @@ -10563,6 +10859,7 @@ private Documents( this.companyTaxIdVerification = companyTaxIdVerification; this.extraParams = extraParams; this.proofOfAddress = proofOfAddress; + this.proofOfBusinessPresence = proofOfBusinessPresence; this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; } @@ -10587,6 +10884,8 @@ public static class Builder { private ProofOfAddress proofOfAddress; + private ProofOfBusinessPresence proofOfBusinessPresence; + private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; /** Finalize and obtain parameter instance from this builder. */ @@ -10600,6 +10899,7 @@ public AccountCreateParams.Documents build() { this.companyTaxIdVerification, this.extraParams, this.proofOfAddress, + this.proofOfBusinessPresence, this.proofOfUltimateBeneficialOwnership); } @@ -10696,6 +10996,13 @@ public Builder setProofOfAddress( return this; } + /** One or more documents that demonstrate proof of business presence. */ + public Builder setProofOfBusinessPresence( + AccountCreateParams.Documents.ProofOfBusinessPresence proofOfBusinessPresence) { + this.proofOfBusinessPresence = proofOfBusinessPresence; + return this; + } + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ public Builder setProofOfUltimateBeneficialOwnership( AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership @@ -11390,6 +11697,102 @@ public Builder addAllFile(List elements) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfBusinessPresence { + /** + * 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; + + /** + * One or more document ids returned by a file upload with a {@code purpose} value + * of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + private ProofOfBusinessPresence(Map extraParams, List files) { + this.extraParams = extraParams; + this.files = files; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Documents.ProofOfBusinessPresence build() { + return new AccountCreateParams.Documents.ProofOfBusinessPresence( + this.extraParams, this.files); + } + + /** + * 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.Documents.ProofOfBusinessPresence#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.Documents.ProofOfBusinessPresence#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Documents.ProofOfBusinessPresence#files} for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Documents.ProofOfBusinessPresence#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ProofOfUltimateBeneficialOwnership { diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index 0dd346bbd33f..1b21bd6fa2c2 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -306,6 +306,14 @@ public static class Components { @SerializedName("payouts_list") PayoutsList payoutsList; + /** + * Configuration for the reporting + * chart embedded component. + */ + @SerializedName("reporting_chart") + ReportingChart reportingChart; + /** * Configuration for the tax @@ -322,6 +330,22 @@ public static class Components { @SerializedName("tax_settings") TaxSettings taxSettings; + /** + * Configuration for the Terminal + * hardware orders embedded component. + */ + @SerializedName("terminal_hardware_orders") + TerminalHardwareOrders terminalHardwareOrders; + + /** + * Configuration for the Terminal + * hardware shop embedded component. + */ + @SerializedName("terminal_hardware_shop") + TerminalHardwareShop terminalHardwareShop; + private Components( AccountManagement accountManagement, AccountOnboarding accountOnboarding, @@ -344,8 +368,11 @@ private Components( PayoutReconciliationReport payoutReconciliationReport, Payouts payouts, PayoutsList payoutsList, + ReportingChart reportingChart, TaxRegistrations taxRegistrations, - TaxSettings taxSettings) { + TaxSettings taxSettings, + TerminalHardwareOrders terminalHardwareOrders, + TerminalHardwareShop terminalHardwareShop) { this.accountManagement = accountManagement; this.accountOnboarding = accountOnboarding; this.balanceReport = balanceReport; @@ -367,8 +394,11 @@ private Components( this.payoutReconciliationReport = payoutReconciliationReport; this.payouts = payouts; this.payoutsList = payoutsList; + this.reportingChart = reportingChart; this.taxRegistrations = taxRegistrations; this.taxSettings = taxSettings; + this.terminalHardwareOrders = terminalHardwareOrders; + this.terminalHardwareShop = terminalHardwareShop; } public static Builder builder() { @@ -418,10 +448,16 @@ public static class Builder { private PayoutsList payoutsList; + private ReportingChart reportingChart; + private TaxRegistrations taxRegistrations; private TaxSettings taxSettings; + private TerminalHardwareOrders terminalHardwareOrders; + + private TerminalHardwareShop terminalHardwareShop; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components build() { return new AccountSessionCreateParams.Components( @@ -446,8 +482,11 @@ public AccountSessionCreateParams.Components build() { this.payoutReconciliationReport, this.payouts, this.payoutsList, + this.reportingChart, this.taxRegistrations, - this.taxSettings); + this.taxSettings, + this.terminalHardwareOrders, + this.terminalHardwareShop); } /** @@ -692,6 +731,17 @@ public Builder setPayoutsList(AccountSessionCreateParams.Components.PayoutsList return this; } + /** + * Configuration for the reporting + * chart embedded component. + */ + public Builder setReportingChart( + AccountSessionCreateParams.Components.ReportingChart reportingChart) { + this.reportingChart = reportingChart; + return this; + } + /** * Configuration for the tax @@ -712,6 +762,28 @@ public Builder setTaxSettings(AccountSessionCreateParams.Components.TaxSettings this.taxSettings = taxSettings; return this; } + + /** + * Configuration for the Terminal + * hardware orders embedded component. + */ + public Builder setTerminalHardwareOrders( + AccountSessionCreateParams.Components.TerminalHardwareOrders terminalHardwareOrders) { + this.terminalHardwareOrders = terminalHardwareOrders; + return this; + } + + /** + * Configuration for the Terminal + * hardware shop embedded component. + */ + public Builder setTerminalHardwareShop( + AccountSessionCreateParams.Components.TerminalHardwareShop terminalHardwareShop) { + this.terminalHardwareShop = terminalHardwareShop; + return this; + } } @Getter @@ -4797,6 +4869,154 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ReportingChart { + /** Required. Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * 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; + + /** An empty list, because this embedded component has no features. */ + @SerializedName("features") + Features features; + + private ReportingChart(Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.ReportingChart build() { + return new AccountSessionCreateParams.Components.ReportingChart( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the embedded component is enabled. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + 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 AccountSessionCreateParams.Components.ReportingChart#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 AccountSessionCreateParams.Components.ReportingChart#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** An empty list, because this embedded component has no features. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.ReportingChart.Features features) { + this.features = features; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Features { + /** + * 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; + + private Features(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.ReportingChart.Features build() { + return new AccountSessionCreateParams.Components.ReportingChart.Features( + this.extraParams); + } + + /** + * 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 + * AccountSessionCreateParams.Components.ReportingChart.Features#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 + * AccountSessionCreateParams.Components.ReportingChart.Features#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class TaxRegistrations { @@ -5090,5 +5310,303 @@ public Builder putAllExtraParam(Map map) { } } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TerminalHardwareOrders { + /** Required. Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * 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; + + /** An empty list, because this embedded component has no features. */ + @SerializedName("features") + Features features; + + private TerminalHardwareOrders( + Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.TerminalHardwareOrders build() { + return new AccountSessionCreateParams.Components.TerminalHardwareOrders( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the embedded component is enabled. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + 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 AccountSessionCreateParams.Components.TerminalHardwareOrders#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 AccountSessionCreateParams.Components.TerminalHardwareOrders#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** An empty list, because this embedded component has no features. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.TerminalHardwareOrders.Features features) { + this.features = features; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Features { + /** + * 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; + + private Features(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.TerminalHardwareOrders.Features build() { + return new AccountSessionCreateParams.Components.TerminalHardwareOrders.Features( + this.extraParams); + } + + /** + * 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 + * AccountSessionCreateParams.Components.TerminalHardwareOrders.Features#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 + * AccountSessionCreateParams.Components.TerminalHardwareOrders.Features#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TerminalHardwareShop { + /** Required. Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * 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; + + /** An empty list, because this embedded component has no features. */ + @SerializedName("features") + Features features; + + private TerminalHardwareShop( + Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.TerminalHardwareShop build() { + return new AccountSessionCreateParams.Components.TerminalHardwareShop( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the embedded component is enabled. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + 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 AccountSessionCreateParams.Components.TerminalHardwareShop#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 AccountSessionCreateParams.Components.TerminalHardwareShop#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** An empty list, because this embedded component has no features. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.TerminalHardwareShop.Features features) { + this.features = features; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Features { + /** + * 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; + + private Features(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.TerminalHardwareShop.Features build() { + return new AccountSessionCreateParams.Components.TerminalHardwareShop.Features( + this.extraParams); + } + + /** + * 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 + * AccountSessionCreateParams.Components.TerminalHardwareShop.Features#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 + * AccountSessionCreateParams.Components.TerminalHardwareShop.Features#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + } } } diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 0e8ada23e8e6..ea9c6cd28d08 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -1695,6 +1695,10 @@ public static class Capabilities { @SerializedName("us_bank_transfer_payments") UsBankTransferPayments usBankTransferPayments; + /** The wero_payments capability. */ + @SerializedName("wero_payments") + WeroPayments weroPayments; + /** The zip_payments capability. */ @SerializedName("zip_payments") ZipPayments zipPayments; @@ -1769,6 +1773,7 @@ private Capabilities( UpiPayments upiPayments, UsBankAccountAchPayments usBankAccountAchPayments, UsBankTransferPayments usBankTransferPayments, + WeroPayments weroPayments, ZipPayments zipPayments) { this.acssDebitPayments = acssDebitPayments; this.affirmPayments = affirmPayments; @@ -1839,6 +1844,7 @@ private Capabilities( this.upiPayments = upiPayments; this.usBankAccountAchPayments = usBankAccountAchPayments; this.usBankTransferPayments = usBankTransferPayments; + this.weroPayments = weroPayments; this.zipPayments = zipPayments; } @@ -1985,6 +1991,8 @@ public static class Builder { private UsBankTransferPayments usBankTransferPayments; + private WeroPayments weroPayments; + private ZipPayments zipPayments; /** Finalize and obtain parameter instance from this builder. */ @@ -2059,6 +2067,7 @@ public AccountUpdateParams.Capabilities build() { this.upiPayments, this.usBankAccountAchPayments, this.usBankTransferPayments, + this.weroPayments, this.zipPayments); } @@ -2551,6 +2560,12 @@ public Builder setUsBankTransferPayments( return this; } + /** The wero_payments capability. */ + public Builder setWeroPayments(AccountUpdateParams.Capabilities.WeroPayments weroPayments) { + this.weroPayments = weroPayments; + return this; + } + /** The zip_payments capability. */ public Builder setZipPayments(AccountUpdateParams.Capabilities.ZipPayments zipPayments) { this.zipPayments = zipPayments; @@ -7991,6 +8006,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class WeroPayments { + /** + * 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; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private WeroPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Capabilities.WeroPayments build() { + return new AccountUpdateParams.Capabilities.WeroPayments( + this.extraParams, this.requested); + } + + /** + * 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.Capabilities.WeroPayments#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.Capabilities.WeroPayments#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ZipPayments { @@ -8177,6 +8272,10 @@ public static class Company { @SerializedName("phone") Object phone; + /** A location where the business has a meaningful physical operating presence. */ + @SerializedName("physical_address") + PhysicalAddress physicalAddress; + /** The primary location where the business conducts operations. */ @SerializedName("principal_place_of_business") PrincipalPlaceOfBusiness principalPlaceOfBusiness; @@ -8252,6 +8351,7 @@ private Company( OwnershipDeclaration ownershipDeclaration, ApiRequestParams.EnumParam ownershipExemptionReason, Object phone, + PhysicalAddress physicalAddress, PrincipalPlaceOfBusiness principalPlaceOfBusiness, Object registrationDate, Object registrationNumber, @@ -8278,6 +8378,7 @@ private Company( this.ownershipDeclaration = ownershipDeclaration; this.ownershipExemptionReason = ownershipExemptionReason; this.phone = phone; + this.physicalAddress = physicalAddress; this.principalPlaceOfBusiness = principalPlaceOfBusiness; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; @@ -8328,6 +8429,8 @@ public static class Builder { private Object phone; + private PhysicalAddress physicalAddress; + private PrincipalPlaceOfBusiness principalPlaceOfBusiness; private Object registrationDate; @@ -8366,6 +8469,7 @@ public AccountUpdateParams.Company build() { this.ownershipDeclaration, this.ownershipExemptionReason, this.phone, + this.physicalAddress, this.principalPlaceOfBusiness, this.registrationDate, this.registrationNumber, @@ -8585,6 +8689,13 @@ public Builder setPhone(EmptyParam phone) { return this; } + /** A location where the business has a meaningful physical operating presence. */ + public Builder setPhysicalAddress( + AccountUpdateParams.Company.PhysicalAddress physicalAddress) { + this.physicalAddress = physicalAddress; + return this; + } + /** The primary location where the business conducts operations. */ public Builder setPrincipalPlaceOfBusiness( AccountUpdateParams.Company.PrincipalPlaceOfBusiness principalPlaceOfBusiness) { @@ -9788,6 +9899,210 @@ public Builder setUserAgent(EmptyParam userAgent) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PhysicalAddress { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * 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; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @SerializedName("state") + Object state; + + private PhysicalAddress( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Company.PhysicalAddress build() { + return new AccountUpdateParams.Company.PhysicalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + 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.Company.PhysicalAddress#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.Company.PhysicalAddress#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class PrincipalPlaceOfBusiness { @@ -10564,6 +10879,10 @@ public static class Documents { @SerializedName("proof_of_address") ProofOfAddress proofOfAddress; + /** One or more documents that demonstrate proof of business presence. */ + @SerializedName("proof_of_business_presence") + ProofOfBusinessPresence proofOfBusinessPresence; + /** * One or more documents showing the company’s proof of registration with the national business * registry. @@ -10584,6 +10903,7 @@ private Documents( CompanyTaxIdVerification companyTaxIdVerification, Map extraParams, ProofOfAddress proofOfAddress, + ProofOfBusinessPresence proofOfBusinessPresence, ProofOfRegistration proofOfRegistration, ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; @@ -10594,6 +10914,7 @@ private Documents( this.companyTaxIdVerification = companyTaxIdVerification; this.extraParams = extraParams; this.proofOfAddress = proofOfAddress; + this.proofOfBusinessPresence = proofOfBusinessPresence; this.proofOfRegistration = proofOfRegistration; this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; } @@ -10619,6 +10940,8 @@ public static class Builder { private ProofOfAddress proofOfAddress; + private ProofOfBusinessPresence proofOfBusinessPresence; + private ProofOfRegistration proofOfRegistration; private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; @@ -10634,6 +10957,7 @@ public AccountUpdateParams.Documents build() { this.companyTaxIdVerification, this.extraParams, this.proofOfAddress, + this.proofOfBusinessPresence, this.proofOfRegistration, this.proofOfUltimateBeneficialOwnership); } @@ -10731,6 +11055,13 @@ public Builder setProofOfAddress( return this; } + /** One or more documents that demonstrate proof of business presence. */ + public Builder setProofOfBusinessPresence( + AccountUpdateParams.Documents.ProofOfBusinessPresence proofOfBusinessPresence) { + this.proofOfBusinessPresence = proofOfBusinessPresence; + return this; + } + /** * One or more documents showing the company’s proof of registration with the national * business registry. @@ -11435,6 +11766,102 @@ public Builder addAllFile(List elements) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfBusinessPresence { + /** + * 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; + + /** + * One or more document ids returned by a file upload with a {@code purpose} value + * of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + private ProofOfBusinessPresence(Map extraParams, List files) { + this.extraParams = extraParams; + this.files = files; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Documents.ProofOfBusinessPresence build() { + return new AccountUpdateParams.Documents.ProofOfBusinessPresence( + this.extraParams, this.files); + } + + /** + * 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.Documents.ProofOfBusinessPresence#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.Documents.ProofOfBusinessPresence#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Documents.ProofOfBusinessPresence#files} for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Documents.ProofOfBusinessPresence#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ProofOfRegistration { diff --git a/src/main/java/com/stripe/param/ChargeCaptureParams.java b/src/main/java/com/stripe/param/ChargeCaptureParams.java index ee0145e8340c..47f603271899 100644 --- a/src/main/java/com/stripe/param/ChargeCaptureParams.java +++ b/src/main/java/com/stripe/param/ChargeCaptureParams.java @@ -43,7 +43,8 @@ public class ChargeCaptureParams extends ApiRequestParams { /** * The email address to send this charge's receipt to. This will override the previously-specified - * email address for this charge, if one was set. Receipts will not be sent in test mode. + * email address for this charge, if one was set. Receipts are only sent for payments in live + * mode. */ @SerializedName("receipt_email") String receiptEmail; @@ -226,8 +227,8 @@ public Builder putAllExtraParam(Map map) { /** * The email address to send this charge's receipt to. This will override the - * previously-specified email address for this charge, if one was set. Receipts will not be sent - * in test mode. + * previously-specified email address for this charge, if one was set. Receipts are only sent + * for payments in live mode. */ public Builder setReceiptEmail(String receiptEmail) { this.receiptEmail = receiptEmail; diff --git a/src/main/java/com/stripe/param/ChargeCreateParams.java b/src/main/java/com/stripe/param/ChargeCreateParams.java index ac66d2aa8bc9..037beb206b4b 100644 --- a/src/main/java/com/stripe/param/ChargeCreateParams.java +++ b/src/main/java/com/stripe/param/ChargeCreateParams.java @@ -115,7 +115,7 @@ public class ChargeCreateParams extends ApiRequestParams { /** * The email address to which this charge's receipt will be sent. The receipt will - * not be sent until the charge is paid, and no receipts will be sent for test mode charges. If + * not be sent until the charge is paid, and receipts are only sent for payments in live mode. If * this charge is for a Customer, the * email address specified here will override the customer's email address. If {@code * receipt_email} is specified for a charge in live mode, a receipt will be sent regardless of @@ -498,9 +498,9 @@ public Builder setRadarOptions(ChargeCreateParams.RadarOptions radarOptions) { /** * The email address to which this charge's receipt will be sent. The receipt will - * not be sent until the charge is paid, and no receipts will be sent for test mode charges. If - * this charge is for a Customer, the - * email address specified here will override the customer's email address. If {@code + * not be sent until the charge is paid, and receipts are only sent for payments in live mode. + * If this charge is for a Customer, + * the email address specified here will override the customer's email address. If {@code * receipt_email} is specified for a charge in live mode, a receipt will be sent regardless of * your email settings. */ diff --git a/src/main/java/com/stripe/param/CustomerCreateParams.java b/src/main/java/com/stripe/param/CustomerCreateParams.java index 9062a153353c..efdf29b335e4 100644 --- a/src/main/java/com/stripe/param/CustomerCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerCreateParams.java @@ -1724,27 +1724,31 @@ public static class TaxIdData { /** * Required. Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, {@code - * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_arn}, - * {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, {@code - * bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code br_cnpj}, - * {@code br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code - * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code - * ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, - * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code - * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, - * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, - * {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, - * {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code - * li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, - * {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code - * my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, - * {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code - * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, - * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code - * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, - * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_acn}, + * {@code au_arn}, {@code au_wpn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code + * bb_tin}, {@code bd_bin}, {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, + * {@code bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code bw_vat}, {@code + * by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code + * ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code ci_vat}, + * {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code + * cv_nif}, {@code cz_dic}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, + * {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code + * fr_siren}, {@code fr_siret}, {@code fr_spi}, {@code gb_vat}, {@code ge_vat}, {@code gh_tin}, + * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code + * ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_kt}, {@code is_vat}, + * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, + * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code + * li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_cf}, {@code md_vat}, {@code me_pib}, + * {@code mk_vat}, {@code mr_nif}, {@code mu_vat}, {@code mx_rfc}, {@code my_frp}, {@code + * my_itn}, {@code my_sst}, {@code mz_nuit}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, + * {@code np_pan}, {@code nz_bn}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code + * ph_tin}, {@code pl_nip}, {@code pt_nif}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, + * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code + * si_tin}, {@code sm_coe}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, + * {@code tj_tin}, {@code tr_tin}, {@code tt_bir}, {@code tt_vat}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ @SerializedName("type") Type type; @@ -1804,27 +1808,30 @@ public Builder putAllExtraParam(Map map) { /** * Required. Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, * {@code al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code - * au_arn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, - * {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code - * br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code - * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, - * {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code - * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, - * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code - * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code - * il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code - * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, - * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code - * my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, - * {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code - * pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, - * {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code - * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, - * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code - * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or - * {@code zw_tin} + * au_acn}, {@code au_arn}, {@code au_wpn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, + * {@code bb_tin}, {@code bd_bin}, {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code + * bj_ifu}, {@code bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code bw_vat}, + * {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, + * {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code + * ci_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, + * {@code cv_nif}, {@code cz_dic}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code + * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code + * fo_vat}, {@code fr_siren}, {@code fr_siret}, {@code fr_spi}, {@code gb_vat}, {@code + * ge_vat}, {@code gh_tin}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, + * {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code + * is_kt}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code + * ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, + * {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_cf}, {@code + * md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mu_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code mz_nuit}, {@code ng_tin}, {@code + * no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_bn}, {@code nz_gst}, {@code om_vat}, + * {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code pt_nif}, {@code py_ruc}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sm_coe}, {@code sn_ninea}, {@code sr_fin}, {@code + * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tt_bir}, {@code tt_vat}, + * {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code + * uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, + * {@code zm_tin}, or {@code zw_tin} */ public Builder setType(CustomerCreateParams.TaxIdData.Type type) { this.type = type; @@ -1860,9 +1867,15 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("au_abn") AU_ABN("au_abn"), + @SerializedName("au_acn") + AU_ACN("au_acn"), + @SerializedName("au_arn") AU_ARN("au_arn"), + @SerializedName("au_wpn") + AU_WPN("au_wpn"), + @SerializedName("aw_tin") AW_TIN("aw_tin"), @@ -1902,6 +1915,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("bs_tin") BS_TIN("bs_tin"), + @SerializedName("bw_vat") + BW_VAT("bw_vat"), + @SerializedName("by_tin") BY_TIN("by_tin"), @@ -1932,6 +1948,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ch_vat") CH_VAT("ch_vat"), + @SerializedName("ci_vat") + CI_VAT("ci_vat"), + @SerializedName("cl_tin") CL_TIN("cl_tin"), @@ -1950,6 +1969,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cv_nif") CV_NIF("cv_nif"), + @SerializedName("cz_dic") + CZ_DIC("cz_dic"), + @SerializedName("de_stn") DE_STN("de_stn"), @@ -1977,12 +1999,24 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("fo_vat") FO_VAT("fo_vat"), + @SerializedName("fr_siren") + FR_SIREN("fr_siren"), + + @SerializedName("fr_siret") + FR_SIRET("fr_siret"), + + @SerializedName("fr_spi") + FR_SPI("fr_spi"), + @SerializedName("gb_vat") GB_VAT("gb_vat"), @SerializedName("ge_vat") GE_VAT("ge_vat"), + @SerializedName("gh_tin") + GH_TIN("gh_tin"), + @SerializedName("gi_tin") GI_TIN("gi_tin"), @@ -2010,6 +2044,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("in_gst") IN_GST("in_gst"), + @SerializedName("is_kt") + IS_KT("is_kt"), + @SerializedName("is_vat") IS_VAT("is_vat"), @@ -2055,6 +2092,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ma_vat") MA_VAT("ma_vat"), + @SerializedName("md_cf") + MD_CF("md_cf"), + @SerializedName("md_vat") MD_VAT("md_vat"), @@ -2067,6 +2107,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("mr_nif") MR_NIF("mr_nif"), + @SerializedName("mu_vat") + MU_VAT("mu_vat"), + @SerializedName("mx_rfc") MX_RFC("mx_rfc"), @@ -2079,6 +2122,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("my_sst") MY_SST("my_sst"), + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + @SerializedName("ng_tin") NG_TIN("ng_tin"), @@ -2091,6 +2137,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("np_pan") NP_PAN("np_pan"), + @SerializedName("nz_bn") + NZ_BN("nz_bn"), + @SerializedName("nz_gst") NZ_GST("nz_gst"), @@ -2106,6 +2155,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("pl_nip") PL_NIP("pl_nip"), + @SerializedName("pt_nif") + PT_NIF("pt_nif"), + @SerializedName("py_ruc") PY_RUC("py_ruc"), @@ -2133,6 +2185,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("si_tin") SI_TIN("si_tin"), + @SerializedName("sm_coe") + SM_COE("sm_coe"), + @SerializedName("sn_ninea") SN_NINEA("sn_ninea"), @@ -2151,6 +2206,12 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("tr_tin") TR_TIN("tr_tin"), + @SerializedName("tt_bir") + TT_BIR("tt_bir"), + + @SerializedName("tt_vat") + TT_VAT("tt_vat"), + @SerializedName("tw_vat") TW_VAT("tw_vat"), diff --git a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java index a366ab20ee43..3aada059d30c 100644 --- a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java @@ -28,26 +28,29 @@ public class CustomerTaxIdCreateParams extends ApiRequestParams { /** * Required. Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, {@code - * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_arn}, - * {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, {@code bf_ifu}, - * {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code br_cnpj}, {@code - * br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code ca_pst_bc}, - * {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code - * ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code - * cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code - * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, - * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, - * {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, - * {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, - * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, - * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code - * py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code - * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, - * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, - * {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_acn}, + * {@code au_arn}, {@code au_wpn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, + * {@code bd_bin}, {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, + * {@code br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code bw_vat}, {@code by_tin}, {@code ca_bn}, + * {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, + * {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code ci_vat}, {@code cl_tin}, {@code cm_niu}, + * {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code cz_dic}, {@code de_stn}, + * {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code + * eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code fr_siren}, {@code fr_siret}, {@code + * fr_spi}, {@code gb_vat}, {@code ge_vat}, {@code gh_tin}, {@code gi_tin}, {@code gn_nif}, {@code + * hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code + * in_gst}, {@code is_kt}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code + * jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code + * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_cf}, {@code + * md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mu_vat}, {@code mx_rfc}, {@code + * my_frp}, {@code my_itn}, {@code my_sst}, {@code mz_nuit}, {@code ng_tin}, {@code no_vat}, + * {@code no_voec}, {@code np_pan}, {@code nz_bn}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, + * {@code ph_tin}, {@code pl_nip}, {@code pt_nif}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, + * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, + * {@code sm_coe}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code + * tj_tin}, {@code tr_tin}, {@code tt_bir}, {@code tt_vat}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -136,27 +139,31 @@ public Builder putAllExtraParam(Map map) { /** * Required. Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, {@code - * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_arn}, - * {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, {@code - * bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code br_cnpj}, - * {@code br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code - * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code - * ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, - * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code - * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, - * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, - * {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, - * {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code - * li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, - * {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code - * my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, - * {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code - * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, - * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code - * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, - * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_acn}, + * {@code au_arn}, {@code au_wpn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code + * bb_tin}, {@code bd_bin}, {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, + * {@code bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code bw_vat}, {@code + * by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code + * ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code ci_vat}, + * {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code + * cv_nif}, {@code cz_dic}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, + * {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code + * fr_siren}, {@code fr_siret}, {@code fr_spi}, {@code gb_vat}, {@code ge_vat}, {@code gh_tin}, + * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code + * ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_kt}, {@code is_vat}, + * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, + * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code + * li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_cf}, {@code md_vat}, {@code me_pib}, + * {@code mk_vat}, {@code mr_nif}, {@code mu_vat}, {@code mx_rfc}, {@code my_frp}, {@code + * my_itn}, {@code my_sst}, {@code mz_nuit}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, + * {@code np_pan}, {@code nz_bn}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code + * ph_tin}, {@code pl_nip}, {@code pt_nif}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, + * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code + * si_tin}, {@code sm_coe}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, + * {@code tj_tin}, {@code tr_tin}, {@code tt_bir}, {@code tt_vat}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ public Builder setType(CustomerTaxIdCreateParams.Type type) { this.type = type; @@ -192,9 +199,15 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("au_abn") AU_ABN("au_abn"), + @SerializedName("au_acn") + AU_ACN("au_acn"), + @SerializedName("au_arn") AU_ARN("au_arn"), + @SerializedName("au_wpn") + AU_WPN("au_wpn"), + @SerializedName("aw_tin") AW_TIN("aw_tin"), @@ -234,6 +247,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("bs_tin") BS_TIN("bs_tin"), + @SerializedName("bw_vat") + BW_VAT("bw_vat"), + @SerializedName("by_tin") BY_TIN("by_tin"), @@ -264,6 +280,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ch_vat") CH_VAT("ch_vat"), + @SerializedName("ci_vat") + CI_VAT("ci_vat"), + @SerializedName("cl_tin") CL_TIN("cl_tin"), @@ -282,6 +301,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cv_nif") CV_NIF("cv_nif"), + @SerializedName("cz_dic") + CZ_DIC("cz_dic"), + @SerializedName("de_stn") DE_STN("de_stn"), @@ -309,12 +331,24 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("fo_vat") FO_VAT("fo_vat"), + @SerializedName("fr_siren") + FR_SIREN("fr_siren"), + + @SerializedName("fr_siret") + FR_SIRET("fr_siret"), + + @SerializedName("fr_spi") + FR_SPI("fr_spi"), + @SerializedName("gb_vat") GB_VAT("gb_vat"), @SerializedName("ge_vat") GE_VAT("ge_vat"), + @SerializedName("gh_tin") + GH_TIN("gh_tin"), + @SerializedName("gi_tin") GI_TIN("gi_tin"), @@ -342,6 +376,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("in_gst") IN_GST("in_gst"), + @SerializedName("is_kt") + IS_KT("is_kt"), + @SerializedName("is_vat") IS_VAT("is_vat"), @@ -387,6 +424,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ma_vat") MA_VAT("ma_vat"), + @SerializedName("md_cf") + MD_CF("md_cf"), + @SerializedName("md_vat") MD_VAT("md_vat"), @@ -399,6 +439,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("mr_nif") MR_NIF("mr_nif"), + @SerializedName("mu_vat") + MU_VAT("mu_vat"), + @SerializedName("mx_rfc") MX_RFC("mx_rfc"), @@ -411,6 +454,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("my_sst") MY_SST("my_sst"), + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + @SerializedName("ng_tin") NG_TIN("ng_tin"), @@ -423,6 +469,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("np_pan") NP_PAN("np_pan"), + @SerializedName("nz_bn") + NZ_BN("nz_bn"), + @SerializedName("nz_gst") NZ_GST("nz_gst"), @@ -438,6 +487,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("pl_nip") PL_NIP("pl_nip"), + @SerializedName("pt_nif") + PT_NIF("pt_nif"), + @SerializedName("py_ruc") PY_RUC("py_ruc"), @@ -465,6 +517,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("si_tin") SI_TIN("si_tin"), + @SerializedName("sm_coe") + SM_COE("sm_coe"), + @SerializedName("sn_ninea") SN_NINEA("sn_ninea"), @@ -483,6 +538,12 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("tr_tin") TR_TIN("tr_tin"), + @SerializedName("tt_bir") + TT_BIR("tt_bir"), + + @SerializedName("tt_vat") + TT_VAT("tt_vat"), + @SerializedName("tw_vat") TW_VAT("tw_vat"), diff --git a/src/main/java/com/stripe/param/DisputeUpdateParams.java b/src/main/java/com/stripe/param/DisputeUpdateParams.java index e69321ab5592..1e7ca2e23a66 100644 --- a/src/main/java/com/stripe/param/DisputeUpdateParams.java +++ b/src/main/java/com/stripe/param/DisputeUpdateParams.java @@ -35,6 +35,10 @@ public class DisputeUpdateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Intended submission method for the dispute. */ + @SerializedName("intended_submission_method") + IntendedSubmissionMethod intendedSubmissionMethod; + /** * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a @@ -56,11 +60,13 @@ private DisputeUpdateParams( Evidence evidence, List expand, Map extraParams, + IntendedSubmissionMethod intendedSubmissionMethod, Object metadata, Boolean submit) { this.evidence = evidence; this.expand = expand; this.extraParams = extraParams; + this.intendedSubmissionMethod = intendedSubmissionMethod; this.metadata = metadata; this.submit = submit; } @@ -76,6 +82,8 @@ public static class Builder { private Map extraParams; + private IntendedSubmissionMethod intendedSubmissionMethod; + private Object metadata; private Boolean submit; @@ -83,7 +91,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public DisputeUpdateParams build() { return new DisputeUpdateParams( - this.evidence, this.expand, this.extraParams, this.metadata, this.submit); + this.evidence, + this.expand, + this.extraParams, + this.intendedSubmissionMethod, + this.metadata, + this.submit); } /** @@ -148,6 +161,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Intended submission method for the dispute. */ + public Builder setIntendedSubmissionMethod( + DisputeUpdateParams.IntendedSubmissionMethod intendedSubmissionMethod) { + this.intendedSubmissionMethod = intendedSubmissionMethod; + return this; + } + /** * Add a key/value pair to `metadata` 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 @@ -220,6 +240,10 @@ public static class Evidence { @SerializedName("access_activity_log") Object accessActivityLog; + /** Evidence to submit when appealing a dispute. */ + @SerializedName("appeal") + Object appeal; + /** The billing address provided by the customer. */ @SerializedName("billing_address") Object billingAddress; @@ -408,6 +432,7 @@ public static class Evidence { private Evidence( Object accessActivityLog, + Object appeal, Object billingAddress, Object cancellationPolicy, Object cancellationPolicyDisclosure, @@ -437,6 +462,7 @@ private Evidence( Object uncategorizedFile, Object uncategorizedText) { this.accessActivityLog = accessActivityLog; + this.appeal = appeal; this.billingAddress = billingAddress; this.cancellationPolicy = cancellationPolicy; this.cancellationPolicyDisclosure = cancellationPolicyDisclosure; @@ -474,6 +500,8 @@ public static Builder builder() { public static class Builder { private Object accessActivityLog; + private Object appeal; + private Object billingAddress; private Object cancellationPolicy; @@ -534,6 +562,7 @@ public static class Builder { public DisputeUpdateParams.Evidence build() { return new DisputeUpdateParams.Evidence( this.accessActivityLog, + this.appeal, this.billingAddress, this.cancellationPolicy, this.cancellationPolicyDisclosure, @@ -584,6 +613,18 @@ public Builder setAccessActivityLog(EmptyParam accessActivityLog) { return this; } + /** Evidence to submit when appealing a dispute. */ + public Builder setAppeal(DisputeUpdateParams.Evidence.Appeal appeal) { + this.appeal = appeal; + return this; + } + + /** Evidence to submit when appealing a dispute. */ + public Builder setAppeal(EmptyParam appeal) { + this.appeal = appeal; + return this; + } + /** The billing address provided by the customer. */ public Builder setBillingAddress(String billingAddress) { this.billingAddress = billingAddress; @@ -1074,6 +1115,224 @@ public Builder setUncategorizedText(EmptyParam uncategorizedText) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Appeal { + /** Evidence for a card dispute appeal. */ + @SerializedName("card") + Object card; + + /** + * 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; + + private Appeal(Object card, Map extraParams) { + this.card = card; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object card; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public DisputeUpdateParams.Evidence.Appeal build() { + return new DisputeUpdateParams.Evidence.Appeal(this.card, this.extraParams); + } + + /** Evidence for a card dispute appeal. */ + public Builder setCard(DisputeUpdateParams.Evidence.Appeal.Card card) { + this.card = card; + return this; + } + + /** Evidence for a card dispute appeal. */ + public Builder setCard(EmptyParam card) { + this.card = card; + 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 DisputeUpdateParams.Evidence.Appeal#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 DisputeUpdateParams.Evidence.Appeal#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Card { + /** + * 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; + + /** An explanation of the reason for filing the appeal. */ + @SerializedName("reason_for_filing") + Object reasonForFiling; + + /** + * One or more document IDs returned by a file upload with a {@code purpose} + * value of {@code dispute_evidence} to support the appeal. + */ + @SerializedName("supporting_files") + Object supportingFiles; + + private Card( + Map extraParams, Object reasonForFiling, Object supportingFiles) { + this.extraParams = extraParams; + this.reasonForFiling = reasonForFiling; + this.supportingFiles = supportingFiles; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object reasonForFiling; + + private Object supportingFiles; + + /** Finalize and obtain parameter instance from this builder. */ + public DisputeUpdateParams.Evidence.Appeal.Card build() { + return new DisputeUpdateParams.Evidence.Appeal.Card( + this.extraParams, this.reasonForFiling, this.supportingFiles); + } + + /** + * 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 DisputeUpdateParams.Evidence.Appeal.Card#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 DisputeUpdateParams.Evidence.Appeal.Card#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** An explanation of the reason for filing the appeal. */ + public Builder setReasonForFiling(String reasonForFiling) { + this.reasonForFiling = reasonForFiling; + return this; + } + + /** An explanation of the reason for filing the appeal. */ + public Builder setReasonForFiling(EmptyParam reasonForFiling) { + this.reasonForFiling = reasonForFiling; + return this; + } + + /** + * Add an element to `supportingFiles` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link DisputeUpdateParams.Evidence.Appeal.Card#supportingFiles} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addSupportingFile(String element) { + if (this.supportingFiles == null || this.supportingFiles instanceof EmptyParam) { + this.supportingFiles = new ArrayList(); + } + ((List) this.supportingFiles).add(element); + return this; + } + + /** + * Add all elements to `supportingFiles` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link DisputeUpdateParams.Evidence.Appeal.Card#supportingFiles} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllSupportingFile(List elements) { + if (this.supportingFiles == null || this.supportingFiles instanceof EmptyParam) { + this.supportingFiles = new ArrayList(); + } + ((List) this.supportingFiles).addAll(elements); + return this; + } + + /** + * One or more document IDs returned by a file upload with a {@code purpose} + * value of {@code dispute_evidence} to support the appeal. + */ + public Builder setSupportingFiles(EmptyParam supportingFiles) { + this.supportingFiles = supportingFiles; + return this; + } + + /** + * One or more document IDs returned by a file upload with a {@code purpose} + * value of {@code dispute_evidence} to support the appeal. + */ + public Builder setSupportingFiles(List supportingFiles) { + this.supportingFiles = supportingFiles; + return this; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class EnhancedEvidence { @@ -2452,4 +2711,25 @@ public Builder setFeeAcknowledged(Boolean feeAcknowledged) { } } } + + public enum IntendedSubmissionMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("prefer_manual") + PREFER_MANUAL("prefer_manual"), + + @SerializedName("prefer_smart_disputes") + PREFER_SMART_DISPUTES("prefer_smart_disputes"), + + @SerializedName("smart_disputes") + SMART_DISPUTES("smart_disputes"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + IntendedSubmissionMethod(String value) { + this.value = value; + } + } } diff --git a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java index 7b4fc59f992a..fcf03dd5776c 100644 --- a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java @@ -1950,18 +1950,36 @@ public enum JurisdictionLevel implements ApiRequestParams.EnumParam { } public enum TaxType implements ApiRequestParams.EnumParam { + @SerializedName("admissions_tax") + ADMISSIONS_TAX("admissions_tax"), + @SerializedName("amusement_tax") AMUSEMENT_TAX("amusement_tax"), + @SerializedName("attendance_tax") + ATTENDANCE_TAX("attendance_tax"), + @SerializedName("communications_tax") COMMUNICATIONS_TAX("communications_tax"), @SerializedName("digital_excise_tax") DIGITAL_EXCISE_TAX("digital_excise_tax"), + @SerializedName("entertainment_tax") + ENTERTAINMENT_TAX("entertainment_tax"), + + @SerializedName("get_fund") + GET_FUND("get_fund"), + + @SerializedName("gross_receipts_tax") + GROSS_RECEIPTS_TAX("gross_receipts_tax"), + @SerializedName("gst") GST("gst"), + @SerializedName("hospitality_tax") + HOSPITALITY_TAX("hospitality_tax"), + @SerializedName("hst") HST("hst"), @@ -1974,9 +1992,15 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("luxury_tax") + LUXURY_TAX("luxury_tax"), + @SerializedName("mass_transit_parking_tax") MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + @SerializedName("nhil") + NHIL("nhil"), + @SerializedName("parking_tax") PARKING_TAX("parking_tax"), @@ -1986,6 +2010,9 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("qst") QST("qst"), + @SerializedName("resort_tax") + RESORT_TAX("resort_tax"), + @SerializedName("retail_delivery_fee") RETAIL_DELIVERY_FEE("retail_delivery_fee"), @@ -1998,6 +2025,9 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("service_tax") SERVICE_TAX("service_tax"), + @SerializedName("tourism_tax") + TOURISM_TAX("tourism_tax"), + @SerializedName("utility_users_tax") UTILITY_USERS_TAX("utility_users_tax"), diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index 1527a65784c5..5d1923c7efb7 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -3949,8 +3949,8 @@ public static class Pix { AmountIncludesIof amountIncludesIof; /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). */ @SerializedName("expires_after_seconds") Long expiresAfterSeconds; @@ -4000,8 +4000,8 @@ public Builder setAmountIncludesIof( } /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). */ public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { this.expiresAfterSeconds = expiresAfterSeconds; @@ -4971,6 +4971,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("sepa_debit") SEPA_DEBIT("sepa_debit"), + @SerializedName("sequra") + SEQURA("sequra"), + @SerializedName("sofort") SOFORT("sofort"), diff --git a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java index 8d9b32f7ab5c..06a1804d2a11 100644 --- a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java @@ -1395,27 +1395,30 @@ public static class TaxId { /** * Required. Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, * {@code al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code - * au_arn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, - * {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code - * br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code - * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, - * {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code - * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, - * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code - * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code - * il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code - * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, - * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code - * my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, - * {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code - * pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, - * {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code - * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, - * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code - * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or - * {@code zw_tin} + * au_acn}, {@code au_arn}, {@code au_wpn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, + * {@code bb_tin}, {@code bd_bin}, {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code + * bj_ifu}, {@code bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code bw_vat}, + * {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, + * {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code + * ci_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, + * {@code cv_nif}, {@code cz_dic}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code + * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code + * fo_vat}, {@code fr_siren}, {@code fr_siret}, {@code fr_spi}, {@code gb_vat}, {@code + * ge_vat}, {@code gh_tin}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, + * {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code + * is_kt}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code + * ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, + * {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_cf}, {@code + * md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mu_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code mz_nuit}, {@code ng_tin}, {@code + * no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_bn}, {@code nz_gst}, {@code om_vat}, + * {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code pt_nif}, {@code py_ruc}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sm_coe}, {@code sn_ninea}, {@code sr_fin}, {@code + * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tt_bir}, {@code tt_vat}, + * {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code + * uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, + * {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -1478,27 +1481,30 @@ public Builder putAllExtraParam(Map map) { /** * Required. Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, * {@code al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code - * au_arn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, - * {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code - * br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code - * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, - * {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code - * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, - * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, - * {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code - * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, - * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code - * jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, - * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code - * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, - * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code - * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code - * ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code - * sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code - * tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, - * {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code - * za_vat}, {@code zm_tin}, or {@code zw_tin} + * au_acn}, {@code au_arn}, {@code au_wpn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, + * {@code bb_tin}, {@code bd_bin}, {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code + * bj_ifu}, {@code bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code bw_vat}, + * {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, + * {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code + * ci_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, + * {@code cv_nif}, {@code cz_dic}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code + * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code + * fo_vat}, {@code fr_siren}, {@code fr_siret}, {@code fr_spi}, {@code gb_vat}, {@code + * ge_vat}, {@code gh_tin}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, + * {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code + * is_kt}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code + * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_cf}, + * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mu_vat}, {@code + * mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code mz_nuit}, {@code ng_tin}, + * {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_bn}, {@code nz_gst}, {@code + * om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code pt_nif}, {@code py_ruc}, + * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code + * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sm_coe}, {@code sn_ninea}, {@code + * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tt_bir}, + * {@code tt_vat}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code + * us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, + * {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(InvoiceCreatePreviewParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -1534,9 +1540,15 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("au_abn") AU_ABN("au_abn"), + @SerializedName("au_acn") + AU_ACN("au_acn"), + @SerializedName("au_arn") AU_ARN("au_arn"), + @SerializedName("au_wpn") + AU_WPN("au_wpn"), + @SerializedName("aw_tin") AW_TIN("aw_tin"), @@ -1576,6 +1588,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("bs_tin") BS_TIN("bs_tin"), + @SerializedName("bw_vat") + BW_VAT("bw_vat"), + @SerializedName("by_tin") BY_TIN("by_tin"), @@ -1606,6 +1621,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ch_vat") CH_VAT("ch_vat"), + @SerializedName("ci_vat") + CI_VAT("ci_vat"), + @SerializedName("cl_tin") CL_TIN("cl_tin"), @@ -1624,6 +1642,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cv_nif") CV_NIF("cv_nif"), + @SerializedName("cz_dic") + CZ_DIC("cz_dic"), + @SerializedName("de_stn") DE_STN("de_stn"), @@ -1651,12 +1672,24 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("fo_vat") FO_VAT("fo_vat"), + @SerializedName("fr_siren") + FR_SIREN("fr_siren"), + + @SerializedName("fr_siret") + FR_SIRET("fr_siret"), + + @SerializedName("fr_spi") + FR_SPI("fr_spi"), + @SerializedName("gb_vat") GB_VAT("gb_vat"), @SerializedName("ge_vat") GE_VAT("ge_vat"), + @SerializedName("gh_tin") + GH_TIN("gh_tin"), + @SerializedName("gi_tin") GI_TIN("gi_tin"), @@ -1684,6 +1717,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("in_gst") IN_GST("in_gst"), + @SerializedName("is_kt") + IS_KT("is_kt"), + @SerializedName("is_vat") IS_VAT("is_vat"), @@ -1729,6 +1765,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ma_vat") MA_VAT("ma_vat"), + @SerializedName("md_cf") + MD_CF("md_cf"), + @SerializedName("md_vat") MD_VAT("md_vat"), @@ -1741,6 +1780,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("mr_nif") MR_NIF("mr_nif"), + @SerializedName("mu_vat") + MU_VAT("mu_vat"), + @SerializedName("mx_rfc") MX_RFC("mx_rfc"), @@ -1753,6 +1795,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("my_sst") MY_SST("my_sst"), + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + @SerializedName("ng_tin") NG_TIN("ng_tin"), @@ -1765,6 +1810,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("np_pan") NP_PAN("np_pan"), + @SerializedName("nz_bn") + NZ_BN("nz_bn"), + @SerializedName("nz_gst") NZ_GST("nz_gst"), @@ -1780,6 +1828,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("pl_nip") PL_NIP("pl_nip"), + @SerializedName("pt_nif") + PT_NIF("pt_nif"), + @SerializedName("py_ruc") PY_RUC("py_ruc"), @@ -1807,6 +1858,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("si_tin") SI_TIN("si_tin"), + @SerializedName("sm_coe") + SM_COE("sm_coe"), + @SerializedName("sn_ninea") SN_NINEA("sn_ninea"), @@ -1825,6 +1879,12 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("tr_tin") TR_TIN("tr_tin"), + @SerializedName("tt_bir") + TT_BIR("tt_bir"), + + @SerializedName("tt_vat") + TT_VAT("tt_vat"), + @SerializedName("tw_vat") TW_VAT("tw_vat"), @@ -2058,13 +2118,13 @@ public static class InvoiceItem { @SerializedName("period") Period period; - /** The ID of the price object. One of {@code price} or {@code price_data} is required. */ + /** The ID of the price object. */ @SerializedName("price") String price; /** * Data used to generate a new Price object - * inline. One of {@code price} or {@code price_data} is required. + * inline. */ @SerializedName("price_data") PriceData priceData; @@ -2398,7 +2458,7 @@ public Builder setPeriod(InvoiceCreatePreviewParams.InvoiceItem.Period period) { return this; } - /** The ID of the price object. One of {@code price} or {@code price_data} is required. */ + /** The ID of the price object. */ public Builder setPrice(String price) { this.price = price; return this; @@ -2406,7 +2466,7 @@ public Builder setPrice(String price) { /** * Data used to generate a new Price object - * inline. One of {@code price} or {@code price_data} is required. + * inline. */ public Builder setPriceData(InvoiceCreatePreviewParams.InvoiceItem.PriceData priceData) { this.priceData = priceData; @@ -3055,6 +3115,14 @@ public static class ScheduleDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The subscription's pause behavior and optional resume behavior. You can provide one entry. + * Include its {@code key} to update an existing pause schedule. Omit {@code pause_schedules} to + * leave the existing schedule unchanged, or pass an empty string ({@code ""}) to clear it. + */ + @SerializedName("pause_schedules") + Object pauseSchedules; + /** * List representing phases of the subscription schedule. Each phase can be customized to have * different durations, plans, and coupons. If there are multiple phases, the {@code end_date} @@ -3074,11 +3142,13 @@ private ScheduleDetails( BillingMode billingMode, EndBehavior endBehavior, Map extraParams, + Object pauseSchedules, List phases, ProrationBehavior prorationBehavior) { this.billingMode = billingMode; this.endBehavior = endBehavior; this.extraParams = extraParams; + this.pauseSchedules = pauseSchedules; this.phases = phases; this.prorationBehavior = prorationBehavior; } @@ -3094,6 +3164,8 @@ public static class Builder { private Map extraParams; + private Object pauseSchedules; + private List phases; private ProrationBehavior prorationBehavior; @@ -3104,6 +3176,7 @@ public InvoiceCreatePreviewParams.ScheduleDetails build() { this.billingMode, this.endBehavior, this.extraParams, + this.pauseSchedules, this.phases, this.prorationBehavior); } @@ -3154,6 +3227,61 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Add an element to `pauseSchedules` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * InvoiceCreatePreviewParams.ScheduleDetails#pauseSchedules} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addPauseSchedule( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule element) { + if (this.pauseSchedules == null || this.pauseSchedules instanceof EmptyParam) { + this.pauseSchedules = + new ArrayList(); + } + ((List) this.pauseSchedules) + .add(element); + return this; + } + + /** + * Add all elements to `pauseSchedules` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * InvoiceCreatePreviewParams.ScheduleDetails#pauseSchedules} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllPauseSchedule( + List elements) { + if (this.pauseSchedules == null || this.pauseSchedules instanceof EmptyParam) { + this.pauseSchedules = + new ArrayList(); + } + ((List) this.pauseSchedules) + .addAll(elements); + return this; + } + + /** + * The subscription's pause behavior and optional resume behavior. You can provide one entry. + * Include its {@code key} to update an existing pause schedule. Omit {@code pause_schedules} + * to leave the existing schedule unchanged, or pass an empty string ({@code ""}) to clear it. + */ + public Builder setPauseSchedules(EmptyParam pauseSchedules) { + this.pauseSchedules = pauseSchedules; + return this; + } + + /** + * The subscription's pause behavior and optional resume behavior. You can provide one entry. + * Include its {@code key} to update an existing pause schedule. Omit {@code pause_schedules} + * to leave the existing schedule unchanged, or pass an empty string ({@code ""}) to clear it. + */ + public Builder setPauseSchedules( + List pauseSchedules) { + this.pauseSchedules = pauseSchedules; + return this; + } + /** * Add an element to `phases` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -3394,6 +3522,1320 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PauseSchedule { + /** + * 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; + + /** A unique identifier for this pause schedule entry. */ + @SerializedName("key") + String key; + + /** Configuration for when and how the subscription pauses. */ + @SerializedName("pause") + Pause pause; + + /** Configuration for when and how the subscription resumes. */ + @SerializedName("resume") + Object resume; + + private PauseSchedule( + Map extraParams, String key, Pause pause, Object resume) { + this.extraParams = extraParams; + this.key = key; + this.pause = pause; + this.resume = resume; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String key; + + private Pause pause; + + private Object resume; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule( + this.extraParams, this.key, this.pause, this.resume); + } + + /** + * 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 InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule#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 InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A unique identifier for this pause schedule entry. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** Configuration for when and how the subscription pauses. */ + public Builder setPause( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause pause) { + this.pause = pause; + return this; + } + + /** Configuration for when and how the subscription resumes. */ + public Builder setResume( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume resume) { + this.resume = resume; + return this; + } + + /** Configuration for when and how the subscription resumes. */ + public Builder setResume(EmptyParam resume) { + this.resume = resume; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pause { + /** + * 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; + + /** When to pause the subscription. */ + @SerializedName("pause_at") + PauseAt pauseAt; + + /** Settings controlling billing behavior during the pause. */ + @SerializedName("settings") + Settings settings; + + private Pause(Map extraParams, PauseAt pauseAt, Settings settings) { + this.extraParams = extraParams; + this.pauseAt = pauseAt; + this.settings = settings; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PauseAt pauseAt; + + private Settings settings; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause( + this.extraParams, this.pauseAt, this.settings); + } + + /** + * 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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause#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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** When to pause the subscription. */ + public Builder setPauseAt( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.PauseAt pauseAt) { + this.pauseAt = pauseAt; + return this; + } + + /** Settings controlling billing behavior during the pause. */ + public Builder setSettings( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings settings) { + this.settings = settings; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PauseAt { + /** + * 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; + + /** + * The Unix timestamp at which to pause the subscription. Required when {@code type} is + * {@code timestamp}. + */ + @SerializedName("timestamp") + Long timestamp; + + /** + * Required. When to pause the subscription. Use {@code now} to pause + * immediately or {@code timestamp} to pause at a specific time. + */ + @SerializedName("type") + Type type; + + private PauseAt(Map extraParams, Long timestamp, Type type) { + this.extraParams = extraParams; + this.timestamp = timestamp; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long timestamp; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.PauseAt build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.PauseAt( + this.extraParams, this.timestamp, this.type); + } + + /** + * 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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.PauseAt#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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.PauseAt#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The Unix timestamp at which to pause the subscription. Required when {@code type} is + * {@code timestamp}. + */ + public Builder setTimestamp(Long timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Required. When to pause the subscription. Use {@code now} to pause + * immediately or {@code timestamp} to pause at a specific time. + */ + public Builder setType( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.PauseAt.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("now") + NOW("now"), + + @SerializedName("timestamp") + TIMESTAMP("timestamp"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Settings { + /** Controls what to bill for when pausing the subscription. */ + @SerializedName("bill_for") + BillFor billFor; + + /** + * 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; + + /** + * Determines whether to generate an invoice for outstanding amounts when pausing. When + * adding a pause schedule, defaults to {@code pending_invoice_item}. On updates, the + * existing value is preserved if not provided. + */ + @SerializedName("invoicing_behavior") + InvoicingBehavior invoicingBehavior; + + /** The pause type. Currently only {@code subscription} is supported. */ + @SerializedName("type") + Type type; + + private Settings( + BillFor billFor, + Map extraParams, + InvoicingBehavior invoicingBehavior, + Type type) { + this.billFor = billFor; + this.extraParams = extraParams; + this.invoicingBehavior = invoicingBehavior; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BillFor billFor; + + private Map extraParams; + + private InvoicingBehavior invoicingBehavior; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings( + this.billFor, this.extraParams, this.invoicingBehavior, this.type); + } + + /** Controls what to bill for when pausing the subscription. */ + public Builder setBillFor( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings.BillFor + billFor) { + this.billFor = billFor; + 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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings#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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Determines whether to generate an invoice for outstanding amounts when pausing. When + * adding a pause schedule, defaults to {@code pending_invoice_item}. On updates, the + * existing value is preserved if not provided. + */ + public Builder setInvoicingBehavior( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings + .InvoicingBehavior + invoicingBehavior) { + this.invoicingBehavior = invoicingBehavior; + return this; + } + + /** The pause type. Currently only {@code subscription} is supported. */ + public Builder setType( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillFor { + /** + * 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; + + /** Controls whether to collect metered usage accrued up to the pause date. */ + @SerializedName("outstanding_usage_through") + OutstandingUsageThrough outstandingUsageThrough; + + /** Controls how unused time on subscription items is credited when pausing. */ + @SerializedName("unused_time_from") + UnusedTimeFrom unusedTimeFrom; + + private BillFor( + Map extraParams, + OutstandingUsageThrough outstandingUsageThrough, + UnusedTimeFrom unusedTimeFrom) { + this.extraParams = extraParams; + this.outstandingUsageThrough = outstandingUsageThrough; + this.unusedTimeFrom = unusedTimeFrom; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private OutstandingUsageThrough outstandingUsageThrough; + + private UnusedTimeFrom unusedTimeFrom; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings.BillFor + build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings + .BillFor(this.extraParams, this.outstandingUsageThrough, this.unusedTimeFrom); + } + + /** + * 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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings.BillFor#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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings.BillFor#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Controls whether to collect metered usage accrued up to the pause date. */ + public Builder setOutstandingUsageThrough( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings.BillFor + .OutstandingUsageThrough + outstandingUsageThrough) { + this.outstandingUsageThrough = outstandingUsageThrough; + return this; + } + + /** Controls how unused time on subscription items is credited when pausing. */ + public Builder setUnusedTimeFrom( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings.BillFor + .UnusedTimeFrom + unusedTimeFrom) { + this.unusedTimeFrom = unusedTimeFrom; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OutstandingUsageThrough { + /** + * 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; + + /** + * Determines whether to collect metered usage accrued up to the pause date. When + * adding a pause schedule, defaults to {@code pause_at}. On updates, the existing + * value is preserved if not provided. + */ + @SerializedName("type") + Type type; + + private OutstandingUsageThrough(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings + .BillFor.OutstandingUsageThrough + build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings + .BillFor.OutstandingUsageThrough(this.extraParams, this.type); + } + + /** + * 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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings.BillFor.OutstandingUsageThrough#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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings.BillFor.OutstandingUsageThrough#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Determines whether to collect metered usage accrued up to the pause date. When + * adding a pause schedule, defaults to {@code pause_at}. On updates, the existing + * value is preserved if not provided. + */ + public Builder setType( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings.BillFor + .OutstandingUsageThrough.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("pause_at") + PAUSE_AT("pause_at"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class UnusedTimeFrom { + /** + * 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; + + /** + * Determines which point in the billing period unused time is credited from. When + * adding a pause schedule, defaults to {@code pause_at}. On updates, the existing + * value is preserved if not provided. + */ + @SerializedName("type") + Type type; + + private UnusedTimeFrom(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings + .BillFor.UnusedTimeFrom + build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings + .BillFor.UnusedTimeFrom(this.extraParams, this.type); + } + + /** + * 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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings.BillFor.UnusedTimeFrom#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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings.BillFor.UnusedTimeFrom#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Determines which point in the billing period unused time is credited from. When + * adding a pause schedule, defaults to {@code pause_at}. On updates, the existing + * value is preserved if not provided. + */ + public Builder setType( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Pause.Settings.BillFor + .UnusedTimeFrom.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("item_current_period_start") + ITEM_CURRENT_PERIOD_START("item_current_period_start"), + + @SerializedName("none") + NONE("none"), + + @SerializedName("pause_at") + PAUSE_AT("pause_at"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + public enum InvoicingBehavior implements ApiRequestParams.EnumParam { + @SerializedName("invoice") + INVOICE("invoice"), + + @SerializedName("pending_invoice_item") + PENDING_INVOICE_ITEM("pending_invoice_item"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InvoicingBehavior(String value) { + this.value = value; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("subscription") + SUBSCRIPTION("subscription"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Resume { + /** + * 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; + + /** When to resume the subscription. */ + @SerializedName("resume_at") + ResumeAt resumeAt; + + /** Settings controlling how the subscription resumes. */ + @SerializedName("settings") + Settings settings; + + private Resume(Map extraParams, ResumeAt resumeAt, Settings settings) { + this.extraParams = extraParams; + this.resumeAt = resumeAt; + this.settings = settings; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ResumeAt resumeAt; + + private Settings settings; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume( + this.extraParams, this.resumeAt, this.settings); + } + + /** + * 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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume#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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** When to resume the subscription. */ + public Builder setResumeAt( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.ResumeAt resumeAt) { + this.resumeAt = resumeAt; + return this; + } + + /** Settings controlling how the subscription resumes. */ + public Builder setSettings( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.Settings settings) { + this.settings = settings; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ResumeAt { + /** + * The duration after which to resume the subscription. Required when {@code type} is + * {@code duration}. + */ + @SerializedName("duration") + Duration duration; + + /** + * 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; + + /** + * The Unix timestamp at which to resume the subscription. Required when {@code type} is + * {@code timestamp}. + */ + @SerializedName("timestamp") + Long timestamp; + + /** + * Required. When to resume the subscription. Use {@code now} to resume + * immediately, {@code duration} to resume after a set duration, or {@code timestamp} to + * resume at a specific time. + */ + @SerializedName("type") + Type type; + + private ResumeAt( + Duration duration, Map extraParams, Long timestamp, Type type) { + this.duration = duration; + this.extraParams = extraParams; + this.timestamp = timestamp; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Duration duration; + + private Map extraParams; + + private Long timestamp; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.ResumeAt + build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.ResumeAt( + this.duration, this.extraParams, this.timestamp, this.type); + } + + /** + * The duration after which to resume the subscription. Required when {@code type} is + * {@code duration}. + */ + public Builder setDuration( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.ResumeAt.Duration + duration) { + this.duration = duration; + 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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.ResumeAt#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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.ResumeAt#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The Unix timestamp at which to resume the subscription. Required when {@code type} is + * {@code timestamp}. + */ + public Builder setTimestamp(Long timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Required. When to resume the subscription. Use {@code now} to resume + * immediately, {@code duration} to resume after a set duration, or {@code timestamp} to + * resume at a specific time. + */ + public Builder setType( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.ResumeAt.Type + type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Duration { + /** + * 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. The time unit for the resume duration. One of {@code day}, + * {@code week}, {@code month}, or {@code year}. + */ + @SerializedName("interval") + Interval interval; + + /** The number of intervals after which the subscription resumes. */ + @SerializedName("interval_count") + Long intervalCount; + + private Duration( + Map extraParams, Interval interval, Long intervalCount) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.ResumeAt + .Duration + build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.ResumeAt + .Duration(this.extraParams, this.interval, this.intervalCount); + } + + /** + * 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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.ResumeAt.Duration#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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.ResumeAt.Duration#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. The time unit for the resume duration. One of {@code + * day}, {@code week}, {@code month}, or {@code year}. + */ + public Builder setInterval( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.ResumeAt.Duration + .Interval + interval) { + this.interval = interval; + return this; + } + + /** The number of intervals after which the subscription resumes. */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("duration") + DURATION("duration"), + + @SerializedName("now") + NOW("now"), + + @SerializedName("timestamp") + TIMESTAMP("timestamp"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Settings { + /** + * Controls the billing cycle anchor when the subscription resumes. When adding a pause + * schedule, defaults to {@code resume_at}. On updates, the existing value is preserved if + * not provided. + */ + @SerializedName("billing_cycle_anchor") + BillingCycleAnchor billingCycleAnchor; + + /** + * 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; + + /** + * Controls whether Stripe attempts payment on the resumption invoice and how payment + * affects the subscription's status. When adding a pause schedule, defaults to {@code + * resume_on_payment_success}. On updates, the existing value is preserved if not + * provided. + */ + @SerializedName("payment_behavior") + PaymentBehavior paymentBehavior; + + /** + * Determines how to handle prorations when the subscription resumes. When adding a pause + * schedule, defaults to {@code create_prorations}. On updates, the existing value is + * preserved if not provided. + */ + @SerializedName("proration_behavior") + ProrationBehavior prorationBehavior; + + private Settings( + BillingCycleAnchor billingCycleAnchor, + Map extraParams, + PaymentBehavior paymentBehavior, + ProrationBehavior prorationBehavior) { + this.billingCycleAnchor = billingCycleAnchor; + this.extraParams = extraParams; + this.paymentBehavior = paymentBehavior; + this.prorationBehavior = prorationBehavior; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BillingCycleAnchor billingCycleAnchor; + + private Map extraParams; + + private PaymentBehavior paymentBehavior; + + private ProrationBehavior prorationBehavior; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.Settings + build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.Settings( + this.billingCycleAnchor, + this.extraParams, + this.paymentBehavior, + this.prorationBehavior); + } + + /** + * Controls the billing cycle anchor when the subscription resumes. When adding a pause + * schedule, defaults to {@code resume_at}. On updates, the existing value is preserved + * if not provided. + */ + public Builder setBillingCycleAnchor( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.Settings + .BillingCycleAnchor + billingCycleAnchor) { + this.billingCycleAnchor = billingCycleAnchor; + 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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.Settings#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 + * InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.Settings#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls whether Stripe attempts payment on the resumption invoice and how payment + * affects the subscription's status. When adding a pause schedule, defaults to {@code + * resume_on_payment_success}. On updates, the existing value is preserved if not + * provided. + */ + public Builder setPaymentBehavior( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.Settings + .PaymentBehavior + paymentBehavior) { + this.paymentBehavior = paymentBehavior; + return this; + } + + /** + * Determines how to handle prorations when the subscription resumes. When adding a + * pause schedule, defaults to {@code create_prorations}. On updates, the existing value + * is preserved if not provided. + */ + public Builder setProrationBehavior( + InvoiceCreatePreviewParams.ScheduleDetails.PauseSchedule.Resume.Settings + .ProrationBehavior + prorationBehavior) { + this.prorationBehavior = prorationBehavior; + return this; + } + } + + public enum BillingCycleAnchor implements ApiRequestParams.EnumParam { + @SerializedName("resume_at") + RESUME_AT("resume_at"), + + @SerializedName("unchanged") + UNCHANGED("unchanged"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BillingCycleAnchor(String value) { + this.value = value; + } + } + + public enum PaymentBehavior implements ApiRequestParams.EnumParam { + @SerializedName("resume_on_payment_attempt") + RESUME_ON_PAYMENT_ATTEMPT("resume_on_payment_attempt"), + + @SerializedName("resume_on_payment_success") + RESUME_ON_PAYMENT_SUCCESS("resume_on_payment_success"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentBehavior(String value) { + this.value = value; + } + } + + public enum ProrationBehavior implements ApiRequestParams.EnumParam { + @SerializedName("always_invoice") + ALWAYS_INVOICE("always_invoice"), + + @SerializedName("create_prorations") + CREATE_PRORATIONS("create_prorations"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationBehavior(String value) { + this.value = value; + } + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Phase { diff --git a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java index 295aa9157121..401c4562cf33 100644 --- a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java @@ -1920,18 +1920,36 @@ public enum JurisdictionLevel implements ApiRequestParams.EnumParam { } public enum TaxType implements ApiRequestParams.EnumParam { + @SerializedName("admissions_tax") + ADMISSIONS_TAX("admissions_tax"), + @SerializedName("amusement_tax") AMUSEMENT_TAX("amusement_tax"), + @SerializedName("attendance_tax") + ATTENDANCE_TAX("attendance_tax"), + @SerializedName("communications_tax") COMMUNICATIONS_TAX("communications_tax"), @SerializedName("digital_excise_tax") DIGITAL_EXCISE_TAX("digital_excise_tax"), + @SerializedName("entertainment_tax") + ENTERTAINMENT_TAX("entertainment_tax"), + + @SerializedName("get_fund") + GET_FUND("get_fund"), + + @SerializedName("gross_receipts_tax") + GROSS_RECEIPTS_TAX("gross_receipts_tax"), + @SerializedName("gst") GST("gst"), + @SerializedName("hospitality_tax") + HOSPITALITY_TAX("hospitality_tax"), + @SerializedName("hst") HST("hst"), @@ -1944,9 +1962,15 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("luxury_tax") + LUXURY_TAX("luxury_tax"), + @SerializedName("mass_transit_parking_tax") MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + @SerializedName("nhil") + NHIL("nhil"), + @SerializedName("parking_tax") PARKING_TAX("parking_tax"), @@ -1956,6 +1980,9 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("qst") QST("qst"), + @SerializedName("resort_tax") + RESORT_TAX("resort_tax"), + @SerializedName("retail_delivery_fee") RETAIL_DELIVERY_FEE("retail_delivery_fee"), @@ -1968,6 +1995,9 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("service_tax") SERVICE_TAX("service_tax"), + @SerializedName("tourism_tax") + TOURISM_TAX("tourism_tax"), + @SerializedName("utility_users_tax") UTILITY_USERS_TAX("utility_users_tax"), diff --git a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java index 765d0b691545..536548e86992 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java @@ -1976,18 +1976,36 @@ public enum JurisdictionLevel implements ApiRequestParams.EnumParam { } public enum TaxType implements ApiRequestParams.EnumParam { + @SerializedName("admissions_tax") + ADMISSIONS_TAX("admissions_tax"), + @SerializedName("amusement_tax") AMUSEMENT_TAX("amusement_tax"), + @SerializedName("attendance_tax") + ATTENDANCE_TAX("attendance_tax"), + @SerializedName("communications_tax") COMMUNICATIONS_TAX("communications_tax"), @SerializedName("digital_excise_tax") DIGITAL_EXCISE_TAX("digital_excise_tax"), + @SerializedName("entertainment_tax") + ENTERTAINMENT_TAX("entertainment_tax"), + + @SerializedName("get_fund") + GET_FUND("get_fund"), + + @SerializedName("gross_receipts_tax") + GROSS_RECEIPTS_TAX("gross_receipts_tax"), + @SerializedName("gst") GST("gst"), + @SerializedName("hospitality_tax") + HOSPITALITY_TAX("hospitality_tax"), + @SerializedName("hst") HST("hst"), @@ -2000,9 +2018,15 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("luxury_tax") + LUXURY_TAX("luxury_tax"), + @SerializedName("mass_transit_parking_tax") MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + @SerializedName("nhil") + NHIL("nhil"), + @SerializedName("parking_tax") PARKING_TAX("parking_tax"), @@ -2012,6 +2036,9 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("qst") QST("qst"), + @SerializedName("resort_tax") + RESORT_TAX("resort_tax"), + @SerializedName("retail_delivery_fee") RETAIL_DELIVERY_FEE("retail_delivery_fee"), @@ -2024,6 +2051,9 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("service_tax") SERVICE_TAX("service_tax"), + @SerializedName("tourism_tax") + TOURISM_TAX("tourism_tax"), + @SerializedName("utility_users_tax") UTILITY_USERS_TAX("utility_users_tax"), diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index f9d16a32fcdb..893decda4ca9 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -4003,8 +4003,8 @@ public static class Pix { AmountIncludesIof amountIncludesIof; /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). */ @SerializedName("expires_after_seconds") Long expiresAfterSeconds; @@ -4054,8 +4054,8 @@ public Builder setAmountIncludesIof( } /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). */ public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { this.expiresAfterSeconds = expiresAfterSeconds; @@ -5034,6 +5034,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("sepa_debit") SEPA_DEBIT("sepa_debit"), + @SerializedName("sequra") + SEQURA("sequra"), + @SerializedName("sofort") SOFORT("sofort"), diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 9cb3e9e64400..0678f83ac243 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -96,10 +96,8 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { Object paymentDetails; /** - * ID of the payment method (a PaymentMethod, Card, or compatible - * Source object) to attach to this PaymentIntent. If the payment method is attached to a - * Customer, it must match the customer that is set on * this PaymentIntent. */ @@ -541,10 +539,8 @@ public Builder setPaymentDetails(EmptyParam paymentDetails) { } /** - * ID of the payment method (a PaymentMethod, Card, or compatible - * Source object) to attach to this PaymentIntent. If the payment method is attached to a - * Customer, it must match the customer that is set on * this PaymentIntent. */ @@ -14198,6 +14194,10 @@ public static class Card { @SerializedName("require_cvc_recollection") Boolean requireCvcRecollection; + /** Set to indicate the future transaction type usage for the card being set up. */ + @SerializedName("setup_credential_usage") + SetupCredentialUsage setupCredentialUsage; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -14244,6 +14244,23 @@ public static class Card { @SerializedName("statement_descriptor_suffix_kanji") Object statementDescriptorSuffixKanji; + /** + * Use this parameter in scenarios where you collect card details and charge them later. + * + *

When making an off session payment with a previously saved card (that was saved with a + * SetupIntent or with a PaymentIntent with {@code setup_future_usage}), set this parameter to + * indicate the type of transaction. + * + *

You can set this parameter at any time before or during PaymentIntent confirmation, and + * confirm this PaymentIntent with {@code off_session=true}. + * + *

Note that this parameter is currently unsupported with the {@code setup_future_usage} + * parameter. + */ + @SerializedName("stored_credential_usage") + StoredCredentialUsage storedCredentialUsage; + /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this payment. @@ -14265,9 +14282,11 @@ private Card( RequestOvercapture requestOvercapture, RequestThreeDSecure requestThreeDSecure, Boolean requireCvcRecollection, + SetupCredentialUsage setupCredentialUsage, ApiRequestParams.EnumParam setupFutureUsage, Object statementDescriptorSuffixKana, Object statementDescriptorSuffixKanji, + StoredCredentialUsage storedCredentialUsage, ThreeDSecure threeDSecure) { this.captureMethod = captureMethod; this.cvcToken = cvcToken; @@ -14282,9 +14301,11 @@ private Card( this.requestOvercapture = requestOvercapture; this.requestThreeDSecure = requestThreeDSecure; this.requireCvcRecollection = requireCvcRecollection; + this.setupCredentialUsage = setupCredentialUsage; this.setupFutureUsage = setupFutureUsage; this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + this.storedCredentialUsage = storedCredentialUsage; this.threeDSecure = threeDSecure; } @@ -14319,12 +14340,16 @@ public static class Builder { private Boolean requireCvcRecollection; + private SetupCredentialUsage setupCredentialUsage; + private ApiRequestParams.EnumParam setupFutureUsage; private Object statementDescriptorSuffixKana; private Object statementDescriptorSuffixKanji; + private StoredCredentialUsage storedCredentialUsage; + private ThreeDSecure threeDSecure; /** Finalize and obtain parameter instance from this builder. */ @@ -14343,9 +14368,11 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.Card build() { this.requestOvercapture, this.requestThreeDSecure, this.requireCvcRecollection, + this.setupCredentialUsage, this.setupFutureUsage, this.statementDescriptorSuffixKana, this.statementDescriptorSuffixKanji, + this.storedCredentialUsage, this.threeDSecure); } @@ -14530,6 +14557,14 @@ public Builder setRequireCvcRecollection(Boolean requireCvcRecollection) { return this; } + /** Set to indicate the future transaction type usage for the card being set up. */ + public Builder setSetupCredentialUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.SetupCredentialUsage + setupCredentialUsage) { + this.setupCredentialUsage = setupCredentialUsage; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -14639,6 +14674,27 @@ public Builder setStatementDescriptorSuffixKanji( return this; } + /** + * Use this parameter in scenarios where you collect card details and charge them later. + * + *

When making an off session payment with a previously saved card (that was saved with a + * SetupIntent or with a PaymentIntent with {@code setup_future_usage}), set this parameter + * to indicate the type of transaction. + * + *

You can set this parameter at any time before or during PaymentIntent confirmation, + * and confirm this PaymentIntent with {@code off_session=true}. + * + *

Note that this parameter is currently unsupported with the {@code setup_future_usage} + * parameter. + */ + public Builder setStoredCredentialUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.StoredCredentialUsage + storedCredentialUsage) { + this.storedCredentialUsage = storedCredentialUsage; + return this; + } + /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this payment. @@ -15952,6 +16008,24 @@ public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { } } + public enum SetupCredentialUsage implements ApiRequestParams.EnumParam { + @SerializedName("installment") + INSTALLMENT("installment"), + + @SerializedName("recurring") + RECURRING("recurring"), + + @SerializedName("unscheduled") + UNSCHEDULED("unscheduled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupCredentialUsage(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -15969,6 +16043,24 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum StoredCredentialUsage implements ApiRequestParams.EnumParam { + @SerializedName("installment") + INSTALLMENT("installment"), + + @SerializedName("recurring") + RECURRING("recurring"), + + @SerializedName("unscheduled") + UNSCHEDULED("unscheduled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + StoredCredentialUsage(String value) { + this.value = value; + } + } } @Getter @@ -22134,15 +22226,18 @@ public static class Pix { AmountIncludesIof amountIncludesIof; /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and + * 1209600, inclusive). If neither expiration option is supplied, defaults to 14400 seconds (4 + * hours). Mutually exclusive with {@code expires_at}. */ @SerializedName("expires_after_seconds") Long expiresAfterSeconds; /** - * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). - * Defaults to 1 day in the future. + * The absolute Unix timestamp at which the Pix expires, between 60 and 1209600 seconds from + * the current time. If neither expiration option is supplied, the Pix expires 14400 seconds + * (4 hours) after PaymentIntent confirmation. Mutually exclusive with {@code + * expires_after_seconds}. */ @SerializedName("expires_at") Long expiresAt; @@ -22237,8 +22332,9 @@ public Builder setAmountIncludesIof( } /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If neither expiration option is supplied, defaults to 14400 + * seconds (4 hours). Mutually exclusive with {@code expires_at}. */ public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { this.expiresAfterSeconds = expiresAfterSeconds; @@ -22246,8 +22342,10 @@ public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { } /** - * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). - * Defaults to 1 day in the future. + * The absolute Unix timestamp at which the Pix expires, between 60 and 1209600 seconds from + * the current time. If neither expiration option is supplied, the Pix expires 14400 seconds + * (4 hours) after PaymentIntent confirmation. Mutually exclusive with {@code + * expires_after_seconds}. */ public Builder setExpiresAt(Long expiresAt) { this.expiresAt = expiresAt; diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 98a8a6ce26fc..9a6260992f36 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -215,9 +215,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { PaymentDetails paymentDetails; /** - * ID of the payment method (a PaymentMethod, Card, or compatible Source - * object) to attach to this PaymentIntent. + * The ID of a PaymentMethod to attach to this PaymentIntent. * *

If you don't provide the {@code payment_method} parameter or the {@code source} parameter * with {@code confirm=true}, {@code source} automatically populates with {@code @@ -918,9 +916,7 @@ public Builder setPaymentDetails(PaymentIntentCreateParams.PaymentDetails paymen } /** - * ID of the payment method (a PaymentMethod, Card, or compatible Source - * object) to attach to this PaymentIntent. + * The ID of a PaymentMethod to attach to this PaymentIntent. * *

If you don't provide the {@code payment_method} parameter or the {@code source} parameter * with {@code confirm=true}, {@code source} automatically populates with {@code @@ -14700,6 +14696,10 @@ public static class Card { @SerializedName("require_cvc_recollection") Boolean requireCvcRecollection; + /** Set to indicate the future transaction type usage for the card being set up. */ + @SerializedName("setup_credential_usage") + SetupCredentialUsage setupCredentialUsage; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -14746,6 +14746,23 @@ public static class Card { @SerializedName("statement_descriptor_suffix_kanji") Object statementDescriptorSuffixKanji; + /** + * Use this parameter in scenarios where you collect card details and charge them later. + * + *

When making an off session payment with a previously saved card (that was saved with a + * SetupIntent or with a PaymentIntent with {@code setup_future_usage}), set this parameter to + * indicate the type of transaction. + * + *

You can set this parameter at any time before or during PaymentIntent confirmation, and + * confirm this PaymentIntent with {@code off_session=true}. + * + *

Note that this parameter is currently unsupported with the {@code setup_future_usage} + * parameter. + */ + @SerializedName("stored_credential_usage") + StoredCredentialUsage storedCredentialUsage; + /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this payment. @@ -14767,9 +14784,11 @@ private Card( RequestOvercapture requestOvercapture, RequestThreeDSecure requestThreeDSecure, Boolean requireCvcRecollection, + SetupCredentialUsage setupCredentialUsage, ApiRequestParams.EnumParam setupFutureUsage, Object statementDescriptorSuffixKana, Object statementDescriptorSuffixKanji, + StoredCredentialUsage storedCredentialUsage, ThreeDSecure threeDSecure) { this.captureMethod = captureMethod; this.cvcToken = cvcToken; @@ -14784,9 +14803,11 @@ private Card( this.requestOvercapture = requestOvercapture; this.requestThreeDSecure = requestThreeDSecure; this.requireCvcRecollection = requireCvcRecollection; + this.setupCredentialUsage = setupCredentialUsage; this.setupFutureUsage = setupFutureUsage; this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + this.storedCredentialUsage = storedCredentialUsage; this.threeDSecure = threeDSecure; } @@ -14821,12 +14842,16 @@ public static class Builder { private Boolean requireCvcRecollection; + private SetupCredentialUsage setupCredentialUsage; + private ApiRequestParams.EnumParam setupFutureUsage; private Object statementDescriptorSuffixKana; private Object statementDescriptorSuffixKanji; + private StoredCredentialUsage storedCredentialUsage; + private ThreeDSecure threeDSecure; /** Finalize and obtain parameter instance from this builder. */ @@ -14845,9 +14870,11 @@ public PaymentIntentCreateParams.PaymentMethodOptions.Card build() { this.requestOvercapture, this.requestThreeDSecure, this.requireCvcRecollection, + this.setupCredentialUsage, this.setupFutureUsage, this.statementDescriptorSuffixKana, this.statementDescriptorSuffixKanji, + this.storedCredentialUsage, this.threeDSecure); } @@ -15032,6 +15059,14 @@ public Builder setRequireCvcRecollection(Boolean requireCvcRecollection) { return this; } + /** Set to indicate the future transaction type usage for the card being set up. */ + public Builder setSetupCredentialUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Card.SetupCredentialUsage + setupCredentialUsage) { + this.setupCredentialUsage = setupCredentialUsage; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -15140,6 +15175,27 @@ public Builder setStatementDescriptorSuffixKanji( return this; } + /** + * Use this parameter in scenarios where you collect card details and charge them later. + * + *

When making an off session payment with a previously saved card (that was saved with a + * SetupIntent or with a PaymentIntent with {@code setup_future_usage}), set this parameter + * to indicate the type of transaction. + * + *

You can set this parameter at any time before or during PaymentIntent confirmation, + * and confirm this PaymentIntent with {@code off_session=true}. + * + *

Note that this parameter is currently unsupported with the {@code setup_future_usage} + * parameter. + */ + public Builder setStoredCredentialUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Card.StoredCredentialUsage + storedCredentialUsage) { + this.storedCredentialUsage = storedCredentialUsage; + return this; + } + /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this payment. @@ -16451,6 +16507,24 @@ public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { } } + public enum SetupCredentialUsage implements ApiRequestParams.EnumParam { + @SerializedName("installment") + INSTALLMENT("installment"), + + @SerializedName("recurring") + RECURRING("recurring"), + + @SerializedName("unscheduled") + UNSCHEDULED("unscheduled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupCredentialUsage(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -16468,6 +16542,24 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum StoredCredentialUsage implements ApiRequestParams.EnumParam { + @SerializedName("installment") + INSTALLMENT("installment"), + + @SerializedName("recurring") + RECURRING("recurring"), + + @SerializedName("unscheduled") + UNSCHEDULED("unscheduled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + StoredCredentialUsage(String value) { + this.value = value; + } + } } @Getter @@ -22624,15 +22716,18 @@ public static class Pix { AmountIncludesIof amountIncludesIof; /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and + * 1209600, inclusive). If neither expiration option is supplied, defaults to 14400 seconds (4 + * hours). Mutually exclusive with {@code expires_at}. */ @SerializedName("expires_after_seconds") Long expiresAfterSeconds; /** - * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). - * Defaults to 1 day in the future. + * The absolute Unix timestamp at which the Pix expires, between 60 and 1209600 seconds from + * the current time. If neither expiration option is supplied, the Pix expires 14400 seconds + * (4 hours) after PaymentIntent confirmation. Mutually exclusive with {@code + * expires_after_seconds}. */ @SerializedName("expires_at") Long expiresAt; @@ -22727,8 +22822,9 @@ public Builder setAmountIncludesIof( } /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If neither expiration option is supplied, defaults to 14400 + * seconds (4 hours). Mutually exclusive with {@code expires_at}. */ public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { this.expiresAfterSeconds = expiresAfterSeconds; @@ -22736,8 +22832,10 @@ public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { } /** - * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). - * Defaults to 1 day in the future. + * The absolute Unix timestamp at which the Pix expires, between 60 and 1209600 seconds from + * the current time. If neither expiration option is supplied, the Pix expires 14400 seconds + * (4 hours) after PaymentIntent confirmation. Mutually exclusive with {@code + * expires_after_seconds}. */ public Builder setExpiresAt(Long expiresAt) { this.expiresAt = expiresAt; diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 1af4b9c2c167..de89216044cf 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -133,10 +133,8 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { Object paymentDetails; /** - * ID of the payment method (a PaymentMethod, Card, or compatible - * Source object) to attach to this PaymentIntent. To unset this field to null, pass in an - * empty string. + * The ID of a PaymentMethod to attach to this PaymentIntent. To unset this field to null, pass in + * an empty string. */ @SerializedName("payment_method") Object paymentMethod; @@ -744,10 +742,8 @@ public Builder setPaymentDetails(EmptyParam paymentDetails) { } /** - * ID of the payment method (a PaymentMethod, Card, or compatible - * Source object) to attach to this PaymentIntent. To unset this field to null, pass in an - * empty string. + * The ID of a PaymentMethod to attach to this PaymentIntent. To unset this field to null, pass + * in an empty string. */ public Builder setPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; @@ -755,10 +751,8 @@ public Builder setPaymentMethod(String paymentMethod) { } /** - * ID of the payment method (a PaymentMethod, Card, or compatible - * Source object) to attach to this PaymentIntent. To unset this field to null, pass in an - * empty string. + * The ID of a PaymentMethod to attach to this PaymentIntent. To unset this field to null, pass + * in an empty string. */ public Builder setPaymentMethod(EmptyParam paymentMethod) { this.paymentMethod = paymentMethod; @@ -14501,6 +14495,10 @@ public static class Card { @SerializedName("require_cvc_recollection") Boolean requireCvcRecollection; + /** Set to indicate the future transaction type usage for the card being set up. */ + @SerializedName("setup_credential_usage") + SetupCredentialUsage setupCredentialUsage; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -14547,6 +14545,23 @@ public static class Card { @SerializedName("statement_descriptor_suffix_kanji") Object statementDescriptorSuffixKanji; + /** + * Use this parameter in scenarios where you collect card details and charge them later. + * + *

When making an off session payment with a previously saved card (that was saved with a + * SetupIntent or with a PaymentIntent with {@code setup_future_usage}), set this parameter to + * indicate the type of transaction. + * + *

You can set this parameter at any time before or during PaymentIntent confirmation, and + * confirm this PaymentIntent with {@code off_session=true}. + * + *

Note that this parameter is currently unsupported with the {@code setup_future_usage} + * parameter. + */ + @SerializedName("stored_credential_usage") + StoredCredentialUsage storedCredentialUsage; + /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this payment. @@ -14568,9 +14583,11 @@ private Card( RequestOvercapture requestOvercapture, RequestThreeDSecure requestThreeDSecure, Boolean requireCvcRecollection, + SetupCredentialUsage setupCredentialUsage, ApiRequestParams.EnumParam setupFutureUsage, Object statementDescriptorSuffixKana, Object statementDescriptorSuffixKanji, + StoredCredentialUsage storedCredentialUsage, ThreeDSecure threeDSecure) { this.captureMethod = captureMethod; this.cvcToken = cvcToken; @@ -14585,9 +14602,11 @@ private Card( this.requestOvercapture = requestOvercapture; this.requestThreeDSecure = requestThreeDSecure; this.requireCvcRecollection = requireCvcRecollection; + this.setupCredentialUsage = setupCredentialUsage; this.setupFutureUsage = setupFutureUsage; this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + this.storedCredentialUsage = storedCredentialUsage; this.threeDSecure = threeDSecure; } @@ -14622,12 +14641,16 @@ public static class Builder { private Boolean requireCvcRecollection; + private SetupCredentialUsage setupCredentialUsage; + private ApiRequestParams.EnumParam setupFutureUsage; private Object statementDescriptorSuffixKana; private Object statementDescriptorSuffixKanji; + private StoredCredentialUsage storedCredentialUsage; + private ThreeDSecure threeDSecure; /** Finalize and obtain parameter instance from this builder. */ @@ -14646,9 +14669,11 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.Card build() { this.requestOvercapture, this.requestThreeDSecure, this.requireCvcRecollection, + this.setupCredentialUsage, this.setupFutureUsage, this.statementDescriptorSuffixKana, this.statementDescriptorSuffixKanji, + this.storedCredentialUsage, this.threeDSecure); } @@ -14843,6 +14868,14 @@ public Builder setRequireCvcRecollection(Boolean requireCvcRecollection) { return this; } + /** Set to indicate the future transaction type usage for the card being set up. */ + public Builder setSetupCredentialUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.SetupCredentialUsage + setupCredentialUsage) { + this.setupCredentialUsage = setupCredentialUsage; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -14951,6 +14984,27 @@ public Builder setStatementDescriptorSuffixKanji( return this; } + /** + * Use this parameter in scenarios where you collect card details and charge them later. + * + *

When making an off session payment with a previously saved card (that was saved with a + * SetupIntent or with a PaymentIntent with {@code setup_future_usage}), set this parameter + * to indicate the type of transaction. + * + *

You can set this parameter at any time before or during PaymentIntent confirmation, + * and confirm this PaymentIntent with {@code off_session=true}. + * + *

Note that this parameter is currently unsupported with the {@code setup_future_usage} + * parameter. + */ + public Builder setStoredCredentialUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.StoredCredentialUsage + storedCredentialUsage) { + this.storedCredentialUsage = storedCredentialUsage; + return this; + } + /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this payment. @@ -16316,6 +16370,24 @@ public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { } } + public enum SetupCredentialUsage implements ApiRequestParams.EnumParam { + @SerializedName("installment") + INSTALLMENT("installment"), + + @SerializedName("recurring") + RECURRING("recurring"), + + @SerializedName("unscheduled") + UNSCHEDULED("unscheduled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupCredentialUsage(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -16333,6 +16405,24 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum StoredCredentialUsage implements ApiRequestParams.EnumParam { + @SerializedName("installment") + INSTALLMENT("installment"), + + @SerializedName("recurring") + RECURRING("recurring"), + + @SerializedName("unscheduled") + UNSCHEDULED("unscheduled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + StoredCredentialUsage(String value) { + this.value = value; + } + } } @Getter @@ -22557,15 +22647,18 @@ public static class Pix { AmountIncludesIof amountIncludesIof; /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and + * 1209600, inclusive). If neither expiration option is supplied, defaults to 14400 seconds (4 + * hours). Mutually exclusive with {@code expires_at}. */ @SerializedName("expires_after_seconds") Long expiresAfterSeconds; /** - * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). - * Defaults to 1 day in the future. + * The absolute Unix timestamp at which the Pix expires, between 60 and 1209600 seconds from + * the current time. If neither expiration option is supplied, the Pix expires 14400 seconds + * (4 hours) after PaymentIntent confirmation. Mutually exclusive with {@code + * expires_after_seconds}. */ @SerializedName("expires_at") Long expiresAt; @@ -22660,8 +22753,9 @@ public Builder setAmountIncludesIof( } /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If neither expiration option is supplied, defaults to 14400 + * seconds (4 hours). Mutually exclusive with {@code expires_at}. */ public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { this.expiresAfterSeconds = expiresAfterSeconds; @@ -22669,8 +22763,10 @@ public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { } /** - * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). - * Defaults to 1 day in the future. + * The absolute Unix timestamp at which the Pix expires, between 60 and 1209600 seconds from + * the current time. If neither expiration option is supplied, the Pix expires 14400 seconds + * (4 hours) after PaymentIntent confirmation. Mutually exclusive with {@code + * expires_after_seconds}. */ public Builder setExpiresAt(Long expiresAt) { this.expiresAt = expiresAt; diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index a447f9c55561..fa3b70abe83f 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -6903,6 +6903,21 @@ public Builder setTrialSettings( @Getter @EqualsAndHashCode(callSuper = false) public static class InvoiceSettings { + /** + * The account tax IDs associated with the subscription. Will be set on invoices generated by + * the subscription. + */ + @SerializedName("account_tax_ids") + Object accountTaxIds; + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + Object customFields; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + String description; + /** * 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. @@ -6912,6 +6927,10 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + String footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -6919,8 +6938,18 @@ public static class InvoiceSettings { @SerializedName("issuer") Issuer issuer; - private InvoiceSettings(Map extraParams, Issuer issuer) { + private InvoiceSettings( + Object accountTaxIds, + Object customFields, + String description, + Map extraParams, + String footer, + Issuer issuer) { + this.accountTaxIds = accountTaxIds; + this.customFields = customFields; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -6929,14 +6958,135 @@ public static Builder builder() { } public static class Builder { + private Object accountTaxIds; + + private Object customFields; + + private String description; + private Map extraParams; + private String footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public PaymentLinkCreateParams.SubscriptionData.InvoiceSettings build() { return new PaymentLinkCreateParams.SubscriptionData.InvoiceSettings( - this.extraParams, this.issuer); + this.accountTaxIds, + this.customFields, + this.description, + this.extraParams, + this.footer, + this.issuer); + } + + /** + * Add an element to `accountTaxIds` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentLinkCreateParams.SubscriptionData.InvoiceSettings#accountTaxIds} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAccountTaxId(String element) { + if (this.accountTaxIds == null || this.accountTaxIds instanceof EmptyParam) { + this.accountTaxIds = new ArrayList(); + } + ((List) this.accountTaxIds).add(element); + return this; + } + + /** + * Add all elements to `accountTaxIds` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link PaymentLinkCreateParams.SubscriptionData.InvoiceSettings#accountTaxIds} for + * the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllAccountTaxId(List elements) { + if (this.accountTaxIds == null || this.accountTaxIds instanceof EmptyParam) { + this.accountTaxIds = new ArrayList(); + } + ((List) this.accountTaxIds).addAll(elements); + return this; + } + + /** + * The account tax IDs associated with the subscription. Will be set on invoices generated + * by the subscription. + */ + public Builder setAccountTaxIds(EmptyParam accountTaxIds) { + this.accountTaxIds = accountTaxIds; + return this; + } + + /** + * The account tax IDs associated with the subscription. Will be set on invoices generated + * by the subscription. + */ + public Builder setAccountTaxIds(List accountTaxIds) { + this.accountTaxIds = accountTaxIds; + return this; + } + + /** + * Add an element to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentLinkCreateParams.SubscriptionData.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField( + PaymentLinkCreateParams.SubscriptionData.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList< + PaymentLinkCreateParams.SubscriptionData.InvoiceSettings.CustomField>(); + } + ((List) + this.customFields) + .add(element); + return this; + } + + /** + * Add all elements to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentLinkCreateParams.SubscriptionData.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList< + PaymentLinkCreateParams.SubscriptionData.InvoiceSettings.CustomField>(); + } + ((List) + this.customFields) + .addAll(elements); + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields( + List + customFields) { + this.customFields = customFields; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(String description) { + this.description = description; + return this; } /** @@ -6967,6 +7117,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Footer to be displayed on the invoice. */ + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -6978,6 +7134,105 @@ public Builder setIssuer( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomField { + /** + * 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. The name of the custom field. This may be up to 40 characters. + */ + @SerializedName("name") + String name; + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + @SerializedName("value") + String value; + + private CustomField(Map extraParams, String name, String value) { + this.extraParams = extraParams; + this.name = name; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String name; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkCreateParams.SubscriptionData.InvoiceSettings.CustomField build() { + return new PaymentLinkCreateParams.SubscriptionData.InvoiceSettings.CustomField( + this.extraParams, this.name, this.value); + } + + /** + * 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 + * PaymentLinkCreateParams.SubscriptionData.InvoiceSettings.CustomField#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 + * PaymentLinkCreateParams.SubscriptionData.InvoiceSettings.CustomField#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. The name of the custom field. This may be up to 40 + * characters. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { @@ -7618,6 +7873,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("satispay") SATISPAY("satispay"), + @SerializedName("scalapay") + SCALAPAY("scalapay"), + @SerializedName("sepa_debit") SEPA_DEBIT("sepa_debit"), diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index 3869f80a8023..5cec221dbc1c 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -6504,6 +6504,21 @@ public Builder setTrialSettings(EmptyParam trialSettings) { @Getter @EqualsAndHashCode(callSuper = false) public static class InvoiceSettings { + /** + * The account tax IDs associated with the subscription. Will be set on invoices generated by + * the subscription. + */ + @SerializedName("account_tax_ids") + Object accountTaxIds; + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + Object customFields; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + Object description; + /** * 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. @@ -6513,6 +6528,10 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + Object footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -6520,8 +6539,18 @@ public static class InvoiceSettings { @SerializedName("issuer") Issuer issuer; - private InvoiceSettings(Map extraParams, Issuer issuer) { + private InvoiceSettings( + Object accountTaxIds, + Object customFields, + Object description, + Map extraParams, + Object footer, + Issuer issuer) { + this.accountTaxIds = accountTaxIds; + this.customFields = customFields; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -6530,14 +6559,141 @@ public static Builder builder() { } public static class Builder { + private Object accountTaxIds; + + private Object customFields; + + private Object description; + private Map extraParams; + private Object footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings build() { return new PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings( - this.extraParams, this.issuer); + this.accountTaxIds, + this.customFields, + this.description, + this.extraParams, + this.footer, + this.issuer); + } + + /** + * Add an element to `accountTaxIds` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings#accountTaxIds} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAccountTaxId(String element) { + if (this.accountTaxIds == null || this.accountTaxIds instanceof EmptyParam) { + this.accountTaxIds = new ArrayList(); + } + ((List) this.accountTaxIds).add(element); + return this; + } + + /** + * Add all elements to `accountTaxIds` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings#accountTaxIds} for + * the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllAccountTaxId(List elements) { + if (this.accountTaxIds == null || this.accountTaxIds instanceof EmptyParam) { + this.accountTaxIds = new ArrayList(); + } + ((List) this.accountTaxIds).addAll(elements); + return this; + } + + /** + * The account tax IDs associated with the subscription. Will be set on invoices generated + * by the subscription. + */ + public Builder setAccountTaxIds(EmptyParam accountTaxIds) { + this.accountTaxIds = accountTaxIds; + return this; + } + + /** + * The account tax IDs associated with the subscription. Will be set on invoices generated + * by the subscription. + */ + public Builder setAccountTaxIds(List accountTaxIds) { + this.accountTaxIds = accountTaxIds; + return this; + } + + /** + * Add an element to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField( + PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList< + PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.CustomField>(); + } + ((List) + this.customFields) + .add(element); + return this; + } + + /** + * Add all elements to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList< + PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.CustomField>(); + } + ((List) + this.customFields) + .addAll(elements); + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields( + List + customFields) { + this.customFields = customFields; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(EmptyParam description) { + this.description = description; + return this; } /** @@ -6568,6 +6724,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Footer to be displayed on the invoice. */ + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + /** Footer to be displayed on the invoice. */ + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -6579,6 +6747,123 @@ public Builder setIssuer( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomField { + /** + * 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. The name of the custom field. This may be up to 40 characters. + */ + @SerializedName("name") + Object name; + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + @SerializedName("value") + Object value; + + private CustomField(Map extraParams, Object name, Object value) { + this.extraParams = extraParams; + this.name = name; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + private Object value; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.CustomField build() { + return new PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.CustomField( + this.extraParams, this.name, this.value); + } + + /** + * 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 + * PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.CustomField#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 + * PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.CustomField#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. The name of the custom field. This may be up to 40 + * characters. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * Required. The name of the custom field. This may be up to 40 + * characters. + */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(EmptyParam value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { @@ -7242,6 +7527,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("satispay") SATISPAY("satispay"), + @SerializedName("scalapay") + SCALAPAY("scalapay"), + @SerializedName("sepa_debit") SEPA_DEBIT("sepa_debit"), diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 476d22ae7565..5727ba8a6901 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -48,10 +48,7 @@ public class SetupIntentConfirmParams extends ApiRequestParams { @SerializedName("mandate_data") Object mandateData; - /** - * ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this - * SetupIntent. - */ + /** The ID of a PaymentMethod to attach to this SetupIntent. */ @SerializedName("payment_method") String paymentMethod; @@ -248,10 +245,7 @@ public Builder setMandateData(EmptyParam mandateData) { return this; } - /** - * ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this - * SetupIntent. - */ + /** The ID of a PaymentMethod to attach to this SetupIntent. */ public Builder setPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; return this; @@ -8312,6 +8306,10 @@ public static class Card { @SerializedName("request_three_d_secure") RequestThreeDSecure requestThreeDSecure; + /** Set to indicate the future transaction type usage for the card being set up. */ + @SerializedName("setup_credential_usage") + SetupCredentialUsage setupCredentialUsage; + /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this setup. @@ -8325,12 +8323,14 @@ private Card( Boolean moto, Network network, RequestThreeDSecure requestThreeDSecure, + SetupCredentialUsage setupCredentialUsage, ThreeDSecure threeDSecure) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.moto = moto; this.network = network; this.requestThreeDSecure = requestThreeDSecure; + this.setupCredentialUsage = setupCredentialUsage; this.threeDSecure = threeDSecure; } @@ -8349,6 +8349,8 @@ public static class Builder { private RequestThreeDSecure requestThreeDSecure; + private SetupCredentialUsage setupCredentialUsage; + private ThreeDSecure threeDSecure; /** Finalize and obtain parameter instance from this builder. */ @@ -8359,6 +8361,7 @@ public SetupIntentConfirmParams.PaymentMethodOptions.Card build() { this.moto, this.network, this.requestThreeDSecure, + this.setupCredentialUsage, this.threeDSecure); } @@ -8435,6 +8438,14 @@ public Builder setRequestThreeDSecure( return this; } + /** Set to indicate the future transaction type usage for the card being set up. */ + public Builder setSetupCredentialUsage( + SetupIntentConfirmParams.PaymentMethodOptions.Card.SetupCredentialUsage + setupCredentialUsage) { + this.setupCredentialUsage = setupCredentialUsage; + return this; + } + /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this setup. @@ -9398,6 +9409,24 @@ public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum SetupCredentialUsage implements ApiRequestParams.EnumParam { + @SerializedName("installment") + INSTALLMENT("installment"), + + @SerializedName("recurring") + RECURRING("recurring"), + + @SerializedName("unscheduled") + UNSCHEDULED("unscheduled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupCredentialUsage(String value) { + this.value = value; + } + } } @Getter diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index 8243d35781bf..67118c76f8be 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -128,10 +128,7 @@ public class SetupIntentCreateParams extends ApiRequestParams { @SerializedName("on_behalf_of") String onBehalfOf; - /** - * ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this - * SetupIntent. - */ + /** The ID of a PaymentMethod to attach to this SetupIntent. */ @SerializedName("payment_method") String paymentMethod; @@ -578,10 +575,7 @@ public Builder setOnBehalfOf(String onBehalfOf) { return this; } - /** - * ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this - * SetupIntent. - */ + /** The ID of a PaymentMethod to attach to this SetupIntent. */ public Builder setPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; return this; @@ -8805,6 +8799,10 @@ public static class Card { @SerializedName("request_three_d_secure") RequestThreeDSecure requestThreeDSecure; + /** Set to indicate the future transaction type usage for the card being set up. */ + @SerializedName("setup_credential_usage") + SetupCredentialUsage setupCredentialUsage; + /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this setup. @@ -8818,12 +8816,14 @@ private Card( Boolean moto, Network network, RequestThreeDSecure requestThreeDSecure, + SetupCredentialUsage setupCredentialUsage, ThreeDSecure threeDSecure) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.moto = moto; this.network = network; this.requestThreeDSecure = requestThreeDSecure; + this.setupCredentialUsage = setupCredentialUsage; this.threeDSecure = threeDSecure; } @@ -8842,6 +8842,8 @@ public static class Builder { private RequestThreeDSecure requestThreeDSecure; + private SetupCredentialUsage setupCredentialUsage; + private ThreeDSecure threeDSecure; /** Finalize and obtain parameter instance from this builder. */ @@ -8852,6 +8854,7 @@ public SetupIntentCreateParams.PaymentMethodOptions.Card build() { this.moto, this.network, this.requestThreeDSecure, + this.setupCredentialUsage, this.threeDSecure); } @@ -8928,6 +8931,14 @@ public Builder setRequestThreeDSecure( return this; } + /** Set to indicate the future transaction type usage for the card being set up. */ + public Builder setSetupCredentialUsage( + SetupIntentCreateParams.PaymentMethodOptions.Card.SetupCredentialUsage + setupCredentialUsage) { + this.setupCredentialUsage = setupCredentialUsage; + return this; + } + /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this setup. @@ -9891,6 +9902,24 @@ public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum SetupCredentialUsage implements ApiRequestParams.EnumParam { + @SerializedName("installment") + INSTALLMENT("installment"), + + @SerializedName("recurring") + RECURRING("recurring"), + + @SerializedName("unscheduled") + UNSCHEDULED("unscheduled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupCredentialUsage(String value) { + this.value = value; + } + } } @Getter diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index 3223a0e9dcdf..9cf42421473c 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -93,8 +93,8 @@ public class SetupIntentUpdateParams extends ApiRequestParams { Object metadata; /** - * ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this - * SetupIntent. To unset this field to null, pass in an empty string. + * The ID of a PaymentMethod to attach to this SetupIntent. To unset this field to null, pass in + * an empty string. */ @SerializedName("payment_method") Object paymentMethod; @@ -510,8 +510,8 @@ public Builder setMetadata(Map metadata) { } /** - * ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this - * SetupIntent. To unset this field to null, pass in an empty string. + * The ID of a PaymentMethod to attach to this SetupIntent. To unset this field to null, pass in + * an empty string. */ public Builder setPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; @@ -519,8 +519,8 @@ public Builder setPaymentMethod(String paymentMethod) { } /** - * ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this - * SetupIntent. To unset this field to null, pass in an empty string. + * The ID of a PaymentMethod to attach to this SetupIntent. To unset this field to null, pass in + * an empty string. */ public Builder setPaymentMethod(EmptyParam paymentMethod) { this.paymentMethod = paymentMethod; @@ -8424,6 +8424,10 @@ public static class Card { @SerializedName("request_three_d_secure") RequestThreeDSecure requestThreeDSecure; + /** Set to indicate the future transaction type usage for the card being set up. */ + @SerializedName("setup_credential_usage") + SetupCredentialUsage setupCredentialUsage; + /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this setup. @@ -8437,12 +8441,14 @@ private Card( Boolean moto, Network network, RequestThreeDSecure requestThreeDSecure, + SetupCredentialUsage setupCredentialUsage, ThreeDSecure threeDSecure) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.moto = moto; this.network = network; this.requestThreeDSecure = requestThreeDSecure; + this.setupCredentialUsage = setupCredentialUsage; this.threeDSecure = threeDSecure; } @@ -8461,6 +8467,8 @@ public static class Builder { private RequestThreeDSecure requestThreeDSecure; + private SetupCredentialUsage setupCredentialUsage; + private ThreeDSecure threeDSecure; /** Finalize and obtain parameter instance from this builder. */ @@ -8471,6 +8479,7 @@ public SetupIntentUpdateParams.PaymentMethodOptions.Card build() { this.moto, this.network, this.requestThreeDSecure, + this.setupCredentialUsage, this.threeDSecure); } @@ -8547,6 +8556,14 @@ public Builder setRequestThreeDSecure( return this; } + /** Set to indicate the future transaction type usage for the card being set up. */ + public Builder setSetupCredentialUsage( + SetupIntentUpdateParams.PaymentMethodOptions.Card.SetupCredentialUsage + setupCredentialUsage) { + this.setupCredentialUsage = setupCredentialUsage; + return this; + } + /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this setup. @@ -9575,6 +9592,24 @@ public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum SetupCredentialUsage implements ApiRequestParams.EnumParam { + @SerializedName("installment") + INSTALLMENT("installment"), + + @SerializedName("recurring") + RECURRING("recurring"), + + @SerializedName("unscheduled") + UNSCHEDULED("unscheduled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupCredentialUsage(String value) { + this.value = value; + } + } } @Getter diff --git a/src/main/java/com/stripe/param/SubscriptionCreateParams.java b/src/main/java/com/stripe/param/SubscriptionCreateParams.java index 93e9de174397..bb3fe22a5c7e 100644 --- a/src/main/java/com/stripe/param/SubscriptionCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionCreateParams.java @@ -6980,8 +6980,8 @@ public enum Purpose implements ApiRequestParams.EnumParam { @EqualsAndHashCode(callSuper = false) public static class Pix { /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). */ @SerializedName("expires_after_seconds") Long expiresAfterSeconds; @@ -7027,8 +7027,8 @@ public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix build() } /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). */ public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { this.expiresAfterSeconds = expiresAfterSeconds; @@ -8175,6 +8175,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("sepa_debit") SEPA_DEBIT("sepa_debit"), + @SerializedName("sequra") + SEQURA("sequra"), + @SerializedName("sofort") SOFORT("sofort"), diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java index 3a64adfe3ea2..4e106196a886 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java @@ -51,9 +51,9 @@ public class SubscriptionScheduleUpdateParams extends ApiRequestParams { Object metadata; /** - * Configures the subscription's pause behavior and, optionally, its resume behavior. Only one - * entry is supported. Include a key to update an existing entry. Omit to leave an existing pause - * schedule unchanged, or pass "" to clear it. + * The subscription's pause behavior and optional resume behavior. You can provide one entry. + * Include its {@code key} to update an existing pause schedule. Omit {@code pause_schedules} to + * leave the existing schedule unchanged, or pass an empty string ({@code ""}) to clear it. */ @SerializedName("pause_schedules") Object pauseSchedules; @@ -278,9 +278,9 @@ public Builder addAllPauseSchedule( } /** - * Configures the subscription's pause behavior and, optionally, its resume behavior. Only one - * entry is supported. Include a key to update an existing entry. Omit to leave an existing - * pause schedule unchanged, or pass "" to clear it. + * The subscription's pause behavior and optional resume behavior. You can provide one entry. + * Include its {@code key} to update an existing pause schedule. Omit {@code pause_schedules} to + * leave the existing schedule unchanged, or pass an empty string ({@code ""}) to clear it. */ public Builder setPauseSchedules(EmptyParam pauseSchedules) { this.pauseSchedules = pauseSchedules; @@ -288,9 +288,9 @@ public Builder setPauseSchedules(EmptyParam pauseSchedules) { } /** - * Configures the subscription's pause behavior and, optionally, its resume behavior. Only one - * entry is supported. Include a key to update an existing entry. Omit to leave an existing - * pause schedule unchanged, or pass "" to clear it. + * The subscription's pause behavior and optional resume behavior. You can provide one entry. + * Include its {@code key} to update an existing pause schedule. Omit {@code pause_schedules} to + * leave the existing schedule unchanged, or pass an empty string ({@code ""}) to clear it. */ public Builder setPauseSchedules( List pauseSchedules) { diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java index fc7d29974e5c..b9fc4d2ee423 100644 --- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java @@ -109,6 +109,8 @@ public class SubscriptionUpdateParams extends ApiRequestParams { * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * For subscriptions created by Checkout Sessions with Managed Payments enabled, you can't update + * this field directly through the API. Customers can update it through the Customer Portal. */ @SerializedName("default_payment_method") Object defaultPaymentMethod; @@ -669,6 +671,9 @@ public Builder setDaysUntilDue(Long daysUntilDue) { * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * For subscriptions created by Checkout Sessions with Managed Payments enabled, you can't + * update this field directly through the API. Customers can update it through the Customer + * Portal. */ public Builder setDefaultPaymentMethod(String defaultPaymentMethod) { this.defaultPaymentMethod = defaultPaymentMethod; @@ -682,6 +687,9 @@ public Builder setDefaultPaymentMethod(String defaultPaymentMethod) { * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * For subscriptions created by Checkout Sessions with Managed Payments enabled, you can't + * update this field directly through the API. Customers can update it through the Customer + * Portal. */ public Builder setDefaultPaymentMethod(EmptyParam defaultPaymentMethod) { this.defaultPaymentMethod = defaultPaymentMethod; @@ -7467,8 +7475,8 @@ public enum Purpose implements ApiRequestParams.EnumParam { @EqualsAndHashCode(callSuper = false) public static class Pix { /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). */ @SerializedName("expires_after_seconds") Long expiresAfterSeconds; @@ -7514,8 +7522,8 @@ public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix build() } /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). */ public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { this.expiresAfterSeconds = expiresAfterSeconds; @@ -8680,6 +8688,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("sepa_debit") SEPA_DEBIT("sepa_debit"), + @SerializedName("sequra") + SEQURA("sequra"), + @SerializedName("sofort") SOFORT("sofort"), diff --git a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java index 0501f843cccd..9440541683d5 100644 --- a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java @@ -28,26 +28,29 @@ public class TaxIdCollectionCreateParams extends ApiRequestParams { /** * Required. Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, {@code - * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_arn}, - * {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, {@code bf_ifu}, - * {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code br_cnpj}, {@code - * br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code ca_pst_bc}, - * {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code - * ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code - * cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code - * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, - * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, - * {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, - * {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, - * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, - * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code - * py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code - * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, - * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, - * {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_acn}, + * {@code au_arn}, {@code au_wpn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, + * {@code bd_bin}, {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, + * {@code br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code bw_vat}, {@code by_tin}, {@code ca_bn}, + * {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, + * {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code ci_vat}, {@code cl_tin}, {@code cm_niu}, + * {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code cz_dic}, {@code de_stn}, + * {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code + * eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code fr_siren}, {@code fr_siret}, {@code + * fr_spi}, {@code gb_vat}, {@code ge_vat}, {@code gh_tin}, {@code gi_tin}, {@code gn_nif}, {@code + * hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code + * in_gst}, {@code is_kt}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code + * jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code + * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_cf}, {@code + * md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mu_vat}, {@code mx_rfc}, {@code + * my_frp}, {@code my_itn}, {@code my_sst}, {@code mz_nuit}, {@code ng_tin}, {@code no_vat}, + * {@code no_voec}, {@code np_pan}, {@code nz_bn}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, + * {@code ph_tin}, {@code pl_nip}, {@code pt_nif}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, + * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, + * {@code sm_coe}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code + * tj_tin}, {@code tr_tin}, {@code tt_bir}, {@code tt_vat}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -136,27 +139,31 @@ public Builder putAllExtraParam(Map map) { /** * Required. Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, {@code - * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_arn}, - * {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, {@code - * bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code br_cnpj}, - * {@code br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code - * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code - * ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, - * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code - * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, - * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, - * {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, - * {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code - * li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, - * {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code - * my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, - * {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code - * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, - * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code - * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, - * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_acn}, + * {@code au_arn}, {@code au_wpn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code + * bb_tin}, {@code bd_bin}, {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, + * {@code bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code bw_vat}, {@code + * by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code + * ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code ci_vat}, + * {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code + * cv_nif}, {@code cz_dic}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, + * {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code + * fr_siren}, {@code fr_siret}, {@code fr_spi}, {@code gb_vat}, {@code ge_vat}, {@code gh_tin}, + * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code + * ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_kt}, {@code is_vat}, + * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, + * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code + * li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_cf}, {@code md_vat}, {@code me_pib}, + * {@code mk_vat}, {@code mr_nif}, {@code mu_vat}, {@code mx_rfc}, {@code my_frp}, {@code + * my_itn}, {@code my_sst}, {@code mz_nuit}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, + * {@code np_pan}, {@code nz_bn}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code + * ph_tin}, {@code pl_nip}, {@code pt_nif}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, + * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code + * si_tin}, {@code sm_coe}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, + * {@code tj_tin}, {@code tr_tin}, {@code tt_bir}, {@code tt_vat}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ public Builder setType(TaxIdCollectionCreateParams.Type type) { this.type = type; @@ -192,9 +199,15 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("au_abn") AU_ABN("au_abn"), + @SerializedName("au_acn") + AU_ACN("au_acn"), + @SerializedName("au_arn") AU_ARN("au_arn"), + @SerializedName("au_wpn") + AU_WPN("au_wpn"), + @SerializedName("aw_tin") AW_TIN("aw_tin"), @@ -234,6 +247,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("bs_tin") BS_TIN("bs_tin"), + @SerializedName("bw_vat") + BW_VAT("bw_vat"), + @SerializedName("by_tin") BY_TIN("by_tin"), @@ -264,6 +280,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ch_vat") CH_VAT("ch_vat"), + @SerializedName("ci_vat") + CI_VAT("ci_vat"), + @SerializedName("cl_tin") CL_TIN("cl_tin"), @@ -282,6 +301,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cv_nif") CV_NIF("cv_nif"), + @SerializedName("cz_dic") + CZ_DIC("cz_dic"), + @SerializedName("de_stn") DE_STN("de_stn"), @@ -309,12 +331,24 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("fo_vat") FO_VAT("fo_vat"), + @SerializedName("fr_siren") + FR_SIREN("fr_siren"), + + @SerializedName("fr_siret") + FR_SIRET("fr_siret"), + + @SerializedName("fr_spi") + FR_SPI("fr_spi"), + @SerializedName("gb_vat") GB_VAT("gb_vat"), @SerializedName("ge_vat") GE_VAT("ge_vat"), + @SerializedName("gh_tin") + GH_TIN("gh_tin"), + @SerializedName("gi_tin") GI_TIN("gi_tin"), @@ -342,6 +376,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("in_gst") IN_GST("in_gst"), + @SerializedName("is_kt") + IS_KT("is_kt"), + @SerializedName("is_vat") IS_VAT("is_vat"), @@ -387,6 +424,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ma_vat") MA_VAT("ma_vat"), + @SerializedName("md_cf") + MD_CF("md_cf"), + @SerializedName("md_vat") MD_VAT("md_vat"), @@ -399,6 +439,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("mr_nif") MR_NIF("mr_nif"), + @SerializedName("mu_vat") + MU_VAT("mu_vat"), + @SerializedName("mx_rfc") MX_RFC("mx_rfc"), @@ -411,6 +454,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("my_sst") MY_SST("my_sst"), + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + @SerializedName("ng_tin") NG_TIN("ng_tin"), @@ -423,6 +469,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("np_pan") NP_PAN("np_pan"), + @SerializedName("nz_bn") + NZ_BN("nz_bn"), + @SerializedName("nz_gst") NZ_GST("nz_gst"), @@ -438,6 +487,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("pl_nip") PL_NIP("pl_nip"), + @SerializedName("pt_nif") + PT_NIF("pt_nif"), + @SerializedName("py_ruc") PY_RUC("py_ruc"), @@ -465,6 +517,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("si_tin") SI_TIN("si_tin"), + @SerializedName("sm_coe") + SM_COE("sm_coe"), + @SerializedName("sn_ninea") SN_NINEA("sn_ninea"), @@ -483,6 +538,12 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("tr_tin") TR_TIN("tr_tin"), + @SerializedName("tt_bir") + TT_BIR("tt_bir"), + + @SerializedName("tt_vat") + TT_VAT("tt_vat"), + @SerializedName("tw_vat") TW_VAT("tw_vat"), diff --git a/src/main/java/com/stripe/param/TaxIdCreateParams.java b/src/main/java/com/stripe/param/TaxIdCreateParams.java index 0e0d94f95009..36d3f7c12729 100644 --- a/src/main/java/com/stripe/param/TaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCreateParams.java @@ -32,26 +32,29 @@ public class TaxIdCreateParams extends ApiRequestParams { /** * Required. Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, {@code - * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_arn}, - * {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, {@code bf_ifu}, - * {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code br_cnpj}, {@code - * br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code ca_pst_bc}, - * {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code - * ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code - * cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code - * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, - * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, - * {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, - * {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, - * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, - * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code - * py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code - * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, - * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, - * {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_acn}, + * {@code au_arn}, {@code au_wpn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, + * {@code bd_bin}, {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, + * {@code br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code bw_vat}, {@code by_tin}, {@code ca_bn}, + * {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, + * {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code ci_vat}, {@code cl_tin}, {@code cm_niu}, + * {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code cz_dic}, {@code de_stn}, + * {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code + * eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code fr_siren}, {@code fr_siret}, {@code + * fr_spi}, {@code gb_vat}, {@code ge_vat}, {@code gh_tin}, {@code gi_tin}, {@code gn_nif}, {@code + * hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code + * in_gst}, {@code is_kt}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code + * jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code + * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_cf}, {@code + * md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mu_vat}, {@code mx_rfc}, {@code + * my_frp}, {@code my_itn}, {@code my_sst}, {@code mz_nuit}, {@code ng_tin}, {@code no_vat}, + * {@code no_voec}, {@code np_pan}, {@code nz_bn}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, + * {@code ph_tin}, {@code pl_nip}, {@code pt_nif}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, + * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, + * {@code sm_coe}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code + * tj_tin}, {@code tr_tin}, {@code tt_bir}, {@code tt_vat}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -150,27 +153,31 @@ public Builder setOwner(TaxIdCreateParams.Owner owner) { /** * Required. Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, {@code - * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_arn}, - * {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, {@code - * bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code br_cnpj}, - * {@code br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code - * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code - * ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, - * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code - * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, - * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, - * {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, - * {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code - * li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, - * {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code - * my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, - * {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code - * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, - * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code - * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, - * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code - * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_acn}, + * {@code au_arn}, {@code au_wpn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code + * bb_tin}, {@code bd_bin}, {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, + * {@code bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code bw_vat}, {@code + * by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code + * ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code ci_vat}, + * {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code + * cv_nif}, {@code cz_dic}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, + * {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code + * fr_siren}, {@code fr_siret}, {@code fr_spi}, {@code gb_vat}, {@code ge_vat}, {@code gh_tin}, + * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code + * ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_kt}, {@code is_vat}, + * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, + * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code + * li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_cf}, {@code md_vat}, {@code me_pib}, + * {@code mk_vat}, {@code mr_nif}, {@code mu_vat}, {@code mx_rfc}, {@code my_frp}, {@code + * my_itn}, {@code my_sst}, {@code mz_nuit}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, + * {@code np_pan}, {@code nz_bn}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code + * ph_tin}, {@code pl_nip}, {@code pt_nif}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, + * {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code + * si_tin}, {@code sm_coe}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, + * {@code tj_tin}, {@code tr_tin}, {@code tt_bir}, {@code tt_vat}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ public Builder setType(TaxIdCreateParams.Type type) { this.type = type; @@ -347,9 +354,15 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("au_abn") AU_ABN("au_abn"), + @SerializedName("au_acn") + AU_ACN("au_acn"), + @SerializedName("au_arn") AU_ARN("au_arn"), + @SerializedName("au_wpn") + AU_WPN("au_wpn"), + @SerializedName("aw_tin") AW_TIN("aw_tin"), @@ -389,6 +402,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("bs_tin") BS_TIN("bs_tin"), + @SerializedName("bw_vat") + BW_VAT("bw_vat"), + @SerializedName("by_tin") BY_TIN("by_tin"), @@ -419,6 +435,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ch_vat") CH_VAT("ch_vat"), + @SerializedName("ci_vat") + CI_VAT("ci_vat"), + @SerializedName("cl_tin") CL_TIN("cl_tin"), @@ -437,6 +456,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cv_nif") CV_NIF("cv_nif"), + @SerializedName("cz_dic") + CZ_DIC("cz_dic"), + @SerializedName("de_stn") DE_STN("de_stn"), @@ -464,12 +486,24 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("fo_vat") FO_VAT("fo_vat"), + @SerializedName("fr_siren") + FR_SIREN("fr_siren"), + + @SerializedName("fr_siret") + FR_SIRET("fr_siret"), + + @SerializedName("fr_spi") + FR_SPI("fr_spi"), + @SerializedName("gb_vat") GB_VAT("gb_vat"), @SerializedName("ge_vat") GE_VAT("ge_vat"), + @SerializedName("gh_tin") + GH_TIN("gh_tin"), + @SerializedName("gi_tin") GI_TIN("gi_tin"), @@ -497,6 +531,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("in_gst") IN_GST("in_gst"), + @SerializedName("is_kt") + IS_KT("is_kt"), + @SerializedName("is_vat") IS_VAT("is_vat"), @@ -542,6 +579,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ma_vat") MA_VAT("ma_vat"), + @SerializedName("md_cf") + MD_CF("md_cf"), + @SerializedName("md_vat") MD_VAT("md_vat"), @@ -554,6 +594,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("mr_nif") MR_NIF("mr_nif"), + @SerializedName("mu_vat") + MU_VAT("mu_vat"), + @SerializedName("mx_rfc") MX_RFC("mx_rfc"), @@ -566,6 +609,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("my_sst") MY_SST("my_sst"), + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + @SerializedName("ng_tin") NG_TIN("ng_tin"), @@ -578,6 +624,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("np_pan") NP_PAN("np_pan"), + @SerializedName("nz_bn") + NZ_BN("nz_bn"), + @SerializedName("nz_gst") NZ_GST("nz_gst"), @@ -593,6 +642,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("pl_nip") PL_NIP("pl_nip"), + @SerializedName("pt_nif") + PT_NIF("pt_nif"), + @SerializedName("py_ruc") PY_RUC("py_ruc"), @@ -620,6 +672,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("si_tin") SI_TIN("si_tin"), + @SerializedName("sm_coe") + SM_COE("sm_coe"), + @SerializedName("sn_ninea") SN_NINEA("sn_ninea"), @@ -638,6 +693,12 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("tr_tin") TR_TIN("tr_tin"), + @SerializedName("tt_bir") + TT_BIR("tt_bir"), + + @SerializedName("tt_vat") + TT_VAT("tt_vat"), + @SerializedName("tw_vat") TW_VAT("tw_vat"), diff --git a/src/main/java/com/stripe/param/TaxRateCreateParams.java b/src/main/java/com/stripe/param/TaxRateCreateParams.java index bfe55f83f520..52d0d8bd13af 100644 --- a/src/main/java/com/stripe/param/TaxRateCreateParams.java +++ b/src/main/java/com/stripe/param/TaxRateCreateParams.java @@ -313,18 +313,36 @@ public Builder setTaxType(TaxRateCreateParams.TaxType taxType) { } public enum TaxType implements ApiRequestParams.EnumParam { + @SerializedName("admissions_tax") + ADMISSIONS_TAX("admissions_tax"), + @SerializedName("amusement_tax") AMUSEMENT_TAX("amusement_tax"), + @SerializedName("attendance_tax") + ATTENDANCE_TAX("attendance_tax"), + @SerializedName("communications_tax") COMMUNICATIONS_TAX("communications_tax"), @SerializedName("digital_excise_tax") DIGITAL_EXCISE_TAX("digital_excise_tax"), + @SerializedName("entertainment_tax") + ENTERTAINMENT_TAX("entertainment_tax"), + + @SerializedName("get_fund") + GET_FUND("get_fund"), + + @SerializedName("gross_receipts_tax") + GROSS_RECEIPTS_TAX("gross_receipts_tax"), + @SerializedName("gst") GST("gst"), + @SerializedName("hospitality_tax") + HOSPITALITY_TAX("hospitality_tax"), + @SerializedName("hst") HST("hst"), @@ -337,9 +355,15 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("luxury_tax") + LUXURY_TAX("luxury_tax"), + @SerializedName("mass_transit_parking_tax") MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + @SerializedName("nhil") + NHIL("nhil"), + @SerializedName("parking_tax") PARKING_TAX("parking_tax"), @@ -349,6 +373,9 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("qst") QST("qst"), + @SerializedName("resort_tax") + RESORT_TAX("resort_tax"), + @SerializedName("retail_delivery_fee") RETAIL_DELIVERY_FEE("retail_delivery_fee"), @@ -361,6 +388,9 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("service_tax") SERVICE_TAX("service_tax"), + @SerializedName("tourism_tax") + TOURISM_TAX("tourism_tax"), + @SerializedName("utility_users_tax") UTILITY_USERS_TAX("utility_users_tax"), diff --git a/src/main/java/com/stripe/param/TaxRateUpdateParams.java b/src/main/java/com/stripe/param/TaxRateUpdateParams.java index 55d7671b505e..7cebbebee101 100644 --- a/src/main/java/com/stripe/param/TaxRateUpdateParams.java +++ b/src/main/java/com/stripe/param/TaxRateUpdateParams.java @@ -347,18 +347,36 @@ public Builder setTaxType(TaxRateUpdateParams.TaxType taxType) { } public enum TaxType implements ApiRequestParams.EnumParam { + @SerializedName("admissions_tax") + ADMISSIONS_TAX("admissions_tax"), + @SerializedName("amusement_tax") AMUSEMENT_TAX("amusement_tax"), + @SerializedName("attendance_tax") + ATTENDANCE_TAX("attendance_tax"), + @SerializedName("communications_tax") COMMUNICATIONS_TAX("communications_tax"), @SerializedName("digital_excise_tax") DIGITAL_EXCISE_TAX("digital_excise_tax"), + @SerializedName("entertainment_tax") + ENTERTAINMENT_TAX("entertainment_tax"), + + @SerializedName("get_fund") + GET_FUND("get_fund"), + + @SerializedName("gross_receipts_tax") + GROSS_RECEIPTS_TAX("gross_receipts_tax"), + @SerializedName("gst") GST("gst"), + @SerializedName("hospitality_tax") + HOSPITALITY_TAX("hospitality_tax"), + @SerializedName("hst") HST("hst"), @@ -371,9 +389,15 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("luxury_tax") + LUXURY_TAX("luxury_tax"), + @SerializedName("mass_transit_parking_tax") MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + @SerializedName("nhil") + NHIL("nhil"), + @SerializedName("parking_tax") PARKING_TAX("parking_tax"), @@ -383,6 +407,9 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("qst") QST("qst"), + @SerializedName("resort_tax") + RESORT_TAX("resort_tax"), + @SerializedName("retail_delivery_fee") RETAIL_DELIVERY_FEE("retail_delivery_fee"), @@ -395,6 +422,9 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("service_tax") SERVICE_TAX("service_tax"), + @SerializedName("tourism_tax") + TOURISM_TAX("tourism_tax"), + @SerializedName("utility_users_tax") UTILITY_USERS_TAX("utility_users_tax"), diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index d005485a8e6d..e717b4b14f55 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -480,6 +480,10 @@ public static class Company { @SerializedName("phone") String phone; + /** A location where the business has a meaningful physical operating presence. */ + @SerializedName("physical_address") + PhysicalAddress physicalAddress; + /** The primary location where the business conducts operations. */ @SerializedName("principal_place_of_business") PrincipalPlaceOfBusiness principalPlaceOfBusiness; @@ -557,6 +561,7 @@ private Company( Boolean ownershipDeclarationShownAndSigned, ApiRequestParams.EnumParam ownershipExemptionReason, String phone, + PhysicalAddress physicalAddress, PrincipalPlaceOfBusiness principalPlaceOfBusiness, Object registrationDate, String registrationNumber, @@ -584,6 +589,7 @@ private Company( this.ownershipDeclarationShownAndSigned = ownershipDeclarationShownAndSigned; this.ownershipExemptionReason = ownershipExemptionReason; this.phone = phone; + this.physicalAddress = physicalAddress; this.principalPlaceOfBusiness = principalPlaceOfBusiness; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; @@ -636,6 +642,8 @@ public static class Builder { private String phone; + private PhysicalAddress physicalAddress; + private PrincipalPlaceOfBusiness principalPlaceOfBusiness; private Object registrationDate; @@ -675,6 +683,7 @@ public TokenCreateParams.Account.Company build() { this.ownershipDeclarationShownAndSigned, this.ownershipExemptionReason, this.phone, + this.physicalAddress, this.principalPlaceOfBusiness, this.registrationDate, this.registrationNumber, @@ -870,6 +879,13 @@ public Builder setPhone(String phone) { return this; } + /** A location where the business has a meaningful physical operating presence. */ + public Builder setPhysicalAddress( + TokenCreateParams.Account.Company.PhysicalAddress physicalAddress) { + this.physicalAddress = physicalAddress; + return this; + } + /** The primary location where the business conducts operations. */ public Builder setPrincipalPlaceOfBusiness( TokenCreateParams.Account.Company.PrincipalPlaceOfBusiness principalPlaceOfBusiness) { @@ -1844,6 +1860,169 @@ public Builder setUserAgent(String userAgent) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PhysicalAddress { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * 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; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + + private PhysicalAddress( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + /** Finalize and obtain parameter instance from this builder. */ + public TokenCreateParams.Account.Company.PhysicalAddress build() { + return new TokenCreateParams.Account.Company.PhysicalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + 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 TokenCreateParams.Account.Company.PhysicalAddress#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 TokenCreateParams.Account.Company.PhysicalAddress#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class PrincipalPlaceOfBusiness { diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index 76555d04dc24..ca36d1d8a8c2 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -666,7 +666,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2026_08_26_DAHLIA("2026-08-26.dahlia"), @SerializedName("2026-09-30.endive") - VERSION_2026_09_30_ENDIVE("2026-09-30.endive"); + VERSION_2026_09_30_ENDIVE("2026-09-30.endive"), + + @SerializedName("2026-10-28.endive") + VERSION_2026_10_28_ENDIVE("2026-10-28.endive"); @Getter(onMethod_ = {@Override}) private final String value; @@ -1382,6 +1385,30 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("test_helpers.test_clock.ready") TEST_HELPERS__TEST_CLOCK__READY("test_helpers.test_clock.ready"), + @SerializedName("three_d_secure.authentication.canceled") + THREE_D_SECURE__AUTHENTICATION__CANCELED("three_d_secure.authentication.canceled"), + + @SerializedName("three_d_secure.authentication.challenge_started") + THREE_D_SECURE__AUTHENTICATION__CHALLENGE_STARTED( + "three_d_secure.authentication.challenge_started"), + + @SerializedName("three_d_secure.authentication.errored") + THREE_D_SECURE__AUTHENTICATION__ERRORED("three_d_secure.authentication.errored"), + + @SerializedName("three_d_secure.authentication.failed") + THREE_D_SECURE__AUTHENTICATION__FAILED("three_d_secure.authentication.failed"), + + @SerializedName("three_d_secure.authentication.requires_challenge") + THREE_D_SECURE__AUTHENTICATION__REQUIRES_CHALLENGE( + "three_d_secure.authentication.requires_challenge"), + + @SerializedName("three_d_secure.authentication.requires_submission") + THREE_D_SECURE__AUTHENTICATION__REQUIRES_SUBMISSION( + "three_d_secure.authentication.requires_submission"), + + @SerializedName("three_d_secure.authentication.succeeded") + THREE_D_SECURE__AUTHENTICATION__SUCCEEDED("three_d_secure.authentication.succeeded"), + @SerializedName("topup.canceled") TOPUP__CANCELED("topup.canceled"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index dbe88137696c..2074c757e9c9 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java @@ -968,6 +968,30 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("test_helpers.test_clock.ready") TEST_HELPERS__TEST_CLOCK__READY("test_helpers.test_clock.ready"), + @SerializedName("three_d_secure.authentication.canceled") + THREE_D_SECURE__AUTHENTICATION__CANCELED("three_d_secure.authentication.canceled"), + + @SerializedName("three_d_secure.authentication.challenge_started") + THREE_D_SECURE__AUTHENTICATION__CHALLENGE_STARTED( + "three_d_secure.authentication.challenge_started"), + + @SerializedName("three_d_secure.authentication.errored") + THREE_D_SECURE__AUTHENTICATION__ERRORED("three_d_secure.authentication.errored"), + + @SerializedName("three_d_secure.authentication.failed") + THREE_D_SECURE__AUTHENTICATION__FAILED("three_d_secure.authentication.failed"), + + @SerializedName("three_d_secure.authentication.requires_challenge") + THREE_D_SECURE__AUTHENTICATION__REQUIRES_CHALLENGE( + "three_d_secure.authentication.requires_challenge"), + + @SerializedName("three_d_secure.authentication.requires_submission") + THREE_D_SECURE__AUTHENTICATION__REQUIRES_SUBMISSION( + "three_d_secure.authentication.requires_submission"), + + @SerializedName("three_d_secure.authentication.succeeded") + THREE_D_SECURE__AUTHENTICATION__SUCCEEDED("three_d_secure.authentication.succeeded"), + @SerializedName("topup.canceled") TOPUP__CANCELED("topup.canceled"), diff --git a/src/main/java/com/stripe/param/apps/InstallCreateParams.java b/src/main/java/com/stripe/param/apps/InstallCreateParams.java index c5a20f755627..dda830740282 100644 --- a/src/main/java/com/stripe/param/apps/InstallCreateParams.java +++ b/src/main/java/com/stripe/param/apps/InstallCreateParams.java @@ -18,8 +18,9 @@ public class InstallCreateParams extends ApiRequestParams { String app; /** - * The distribution channel to install from. Defaults to {@code public}. A private app must be - * installed on {@code private_test} or {@code private_live}, matching the mode of the API key. + * The distribution channel to install from. Defaults to {@code public}, which only app developers + * and embedding platforms can use. An account installing its own private app must pass {@code + * private_test} or {@code private_live}, matching the mode of the API key. */ @SerializedName("channel") Channel channel; @@ -103,8 +104,9 @@ public Builder setApp(String app) { } /** - * The distribution channel to install from. Defaults to {@code public}. A private app must be - * installed on {@code private_test} or {@code private_live}, matching the mode of the API key. + * The distribution channel to install from. Defaults to {@code public}, which only app + * developers and embedding platforms can use. An account installing its own private app must + * pass {@code private_test} or {@code private_live}, matching the mode of the API key. */ public Builder setChannel(InstallCreateParams.Channel channel) { this.channel = channel; diff --git a/src/main/java/com/stripe/param/apps/InstallListParams.java b/src/main/java/com/stripe/param/apps/InstallListParams.java index 251c01c95d0e..b0f157792685 100644 --- a/src/main/java/com/stripe/param/apps/InstallListParams.java +++ b/src/main/java/com/stripe/param/apps/InstallListParams.java @@ -14,8 +14,9 @@ @EqualsAndHashCode(callSuper = false) public class InstallListParams extends ApiRequestParams { /** - * Only return installs made by this account. Only useful to app developers and embedding - * platforms, whose lists span the accounts that installed their app. + * Only return installs made by this account. Only useful to an app developer filtering by its own + * app with its own key, whose list spans the accounts that installed the app; other lists only + * accept the authenticated account. */ @SerializedName("account") String account; @@ -81,7 +82,10 @@ public class InstallListParams extends ApiRequestParams { @SerializedName("starting_after") String startingAfter; - /** Only return installs with the given status. */ + /** + * Only return installs with the given status: {@code installed}, {@code installing}, {@code + * install_failed}, {@code uninstalling}, or {@code uninstall_failed}. + */ @SerializedName("status") Status status; @@ -159,8 +163,9 @@ public InstallListParams build() { } /** - * Only return installs made by this account. Only useful to app developers and embedding - * platforms, whose lists span the accounts that installed their app. + * Only return installs made by this account. Only useful to an app developer filtering by its + * own app with its own key, whose list spans the accounts that installed the app; other lists + * only accept the authenticated account. */ public Builder setAccount(String account) { this.account = account; @@ -289,7 +294,10 @@ public Builder setStartingAfter(String startingAfter) { return this; } - /** Only return installs with the given status. */ + /** + * Only return installs with the given status: {@code installed}, {@code installing}, {@code + * install_failed}, {@code uninstalling}, or {@code uninstall_failed}. + */ public Builder setStatus(InstallListParams.Status status) { this.status = status; return this; diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java index 03ab5f7e91f7..d022baed21ca 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java @@ -389,6 +389,10 @@ public static class Features { @SerializedName("subscription_cancel") SubscriptionCancel subscriptionCancel; + /** Information about pausing subscriptions in the portal. */ + @SerializedName("subscription_pause") + SubscriptionPause subscriptionPause; + /** Information about updating subscriptions in the portal. */ @SerializedName("subscription_update") SubscriptionUpdate subscriptionUpdate; @@ -399,12 +403,14 @@ private Features( InvoiceHistory invoiceHistory, PaymentMethodUpdate paymentMethodUpdate, SubscriptionCancel subscriptionCancel, + SubscriptionPause subscriptionPause, SubscriptionUpdate subscriptionUpdate) { this.customerUpdate = customerUpdate; this.extraParams = extraParams; this.invoiceHistory = invoiceHistory; this.paymentMethodUpdate = paymentMethodUpdate; this.subscriptionCancel = subscriptionCancel; + this.subscriptionPause = subscriptionPause; this.subscriptionUpdate = subscriptionUpdate; } @@ -423,6 +429,8 @@ public static class Builder { private SubscriptionCancel subscriptionCancel; + private SubscriptionPause subscriptionPause; + private SubscriptionUpdate subscriptionUpdate; /** Finalize and obtain parameter instance from this builder. */ @@ -433,6 +441,7 @@ public ConfigurationCreateParams.Features build() { this.invoiceHistory, this.paymentMethodUpdate, this.subscriptionCancel, + this.subscriptionPause, this.subscriptionUpdate); } @@ -490,6 +499,13 @@ public Builder setSubscriptionCancel( return this; } + /** Information about pausing subscriptions in the portal. */ + public Builder setSubscriptionPause( + ConfigurationCreateParams.Features.SubscriptionPause subscriptionPause) { + this.subscriptionPause = subscriptionPause; + return this; + } + /** Information about updating subscriptions in the portal. */ public Builder setSubscriptionUpdate( ConfigurationCreateParams.Features.SubscriptionUpdate subscriptionUpdate) { @@ -1256,6 +1272,404 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SubscriptionPause { + /** + * Controls how long a subscription can be paused. Defaults to {@code interval_options} with a + * single one-month option. + */ + @SerializedName("duration") + Duration duration; + + /** + * Whether the feature is enabled. Customers can only pause subscriptions in the redesigned customer portal. + */ + @SerializedName("enabled") + Boolean enabled; + + /** + * 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; + + private SubscriptionPause( + Duration duration, Boolean enabled, Map extraParams) { + this.duration = duration; + this.enabled = enabled; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Duration duration; + + private Boolean enabled; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.Features.SubscriptionPause build() { + return new ConfigurationCreateParams.Features.SubscriptionPause( + this.duration, this.enabled, this.extraParams); + } + + /** + * Controls how long a subscription can be paused. Defaults to {@code interval_options} with + * a single one-month option. + */ + public Builder setDuration( + ConfigurationCreateParams.Features.SubscriptionPause.Duration duration) { + this.duration = duration; + return this; + } + + /** + * Whether the feature is enabled. Customers can only pause subscriptions in the redesigned customer portal. + */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + 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 ConfigurationCreateParams.Features.SubscriptionPause#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 ConfigurationCreateParams.Features.SubscriptionPause#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Duration { + /** + * 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; + + /** + * The preset pause durations customers can choose from. Required when {@code type} is + * {@code interval_options}. + */ + @SerializedName("interval_options") + Object intervalOptions; + + /** + * Required. Whether subscriptions can be paused indefinitely or for a + * preset duration. + */ + @SerializedName("type") + Type type; + + private Duration(Map extraParams, Object intervalOptions, Type type) { + this.extraParams = extraParams; + this.intervalOptions = intervalOptions; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object intervalOptions; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.Features.SubscriptionPause.Duration build() { + return new ConfigurationCreateParams.Features.SubscriptionPause.Duration( + this.extraParams, this.intervalOptions, this.type); + } + + /** + * 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 + * ConfigurationCreateParams.Features.SubscriptionPause.Duration#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 + * ConfigurationCreateParams.Features.SubscriptionPause.Duration#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `intervalOptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * ConfigurationCreateParams.Features.SubscriptionPause.Duration#intervalOptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addIntervalOption( + ConfigurationCreateParams.Features.SubscriptionPause.Duration.IntervalOption + element) { + if (this.intervalOptions == null || this.intervalOptions instanceof EmptyParam) { + this.intervalOptions = + new ArrayList< + ConfigurationCreateParams.Features.SubscriptionPause.Duration + .IntervalOption>(); + } + ((List) + this.intervalOptions) + .add(element); + return this; + } + + /** + * Add all elements to `intervalOptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * ConfigurationCreateParams.Features.SubscriptionPause.Duration#intervalOptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllIntervalOption( + List + elements) { + if (this.intervalOptions == null || this.intervalOptions instanceof EmptyParam) { + this.intervalOptions = + new ArrayList< + ConfigurationCreateParams.Features.SubscriptionPause.Duration + .IntervalOption>(); + } + ((List) + this.intervalOptions) + .addAll(elements); + return this; + } + + /** + * The preset pause durations customers can choose from. Required when {@code type} is + * {@code interval_options}. + */ + public Builder setIntervalOptions(EmptyParam intervalOptions) { + this.intervalOptions = intervalOptions; + return this; + } + + /** + * The preset pause durations customers can choose from. Required when {@code type} is + * {@code interval_options}. + */ + public Builder setIntervalOptions( + List + intervalOptions) { + this.intervalOptions = intervalOptions; + return this; + } + + /** + * Required. Whether subscriptions can be paused indefinitely or for a + * preset duration. + */ + public Builder setType( + ConfigurationCreateParams.Features.SubscriptionPause.Duration.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IntervalOption { + /** + * 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. Specifies the pause duration unit. Either {@code day}, + * {@code week}, {@code month}, or {@code year}. + */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals in the pause duration. Defaults to 1. The maximum duration is + * three years. + */ + @SerializedName("interval_count") + Long intervalCount; + + private IntervalOption( + Map extraParams, Interval interval, Long intervalCount) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.Features.SubscriptionPause.Duration.IntervalOption + build() { + return new ConfigurationCreateParams.Features.SubscriptionPause.Duration + .IntervalOption(this.extraParams, this.interval, this.intervalCount); + } + + /** + * 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 + * ConfigurationCreateParams.Features.SubscriptionPause.Duration.IntervalOption#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 + * ConfigurationCreateParams.Features.SubscriptionPause.Duration.IntervalOption#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. Specifies the pause duration unit. Either {@code day}, + * {@code week}, {@code month}, or {@code year}. + */ + public Builder setInterval( + ConfigurationCreateParams.Features.SubscriptionPause.Duration.IntervalOption + .Interval + interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals in the pause duration. Defaults to 1. The maximum duration is + * three years. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("indefinite") + INDEFINITE("indefinite"), + + @SerializedName("interval_options") + INTERVAL_OPTIONS("interval_options"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SubscriptionUpdate { diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java index e8fa42b407e2..67249303f4a3 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java @@ -440,6 +440,10 @@ public static class Features { @SerializedName("subscription_cancel") SubscriptionCancel subscriptionCancel; + /** Information about pausing subscriptions in the portal. */ + @SerializedName("subscription_pause") + SubscriptionPause subscriptionPause; + /** Information about updating subscriptions in the portal. */ @SerializedName("subscription_update") SubscriptionUpdate subscriptionUpdate; @@ -450,12 +454,14 @@ private Features( InvoiceHistory invoiceHistory, PaymentMethodUpdate paymentMethodUpdate, SubscriptionCancel subscriptionCancel, + SubscriptionPause subscriptionPause, SubscriptionUpdate subscriptionUpdate) { this.customerUpdate = customerUpdate; this.extraParams = extraParams; this.invoiceHistory = invoiceHistory; this.paymentMethodUpdate = paymentMethodUpdate; this.subscriptionCancel = subscriptionCancel; + this.subscriptionPause = subscriptionPause; this.subscriptionUpdate = subscriptionUpdate; } @@ -474,6 +480,8 @@ public static class Builder { private SubscriptionCancel subscriptionCancel; + private SubscriptionPause subscriptionPause; + private SubscriptionUpdate subscriptionUpdate; /** Finalize and obtain parameter instance from this builder. */ @@ -484,6 +492,7 @@ public ConfigurationUpdateParams.Features build() { this.invoiceHistory, this.paymentMethodUpdate, this.subscriptionCancel, + this.subscriptionPause, this.subscriptionUpdate); } @@ -541,6 +550,13 @@ public Builder setSubscriptionCancel( return this; } + /** Information about pausing subscriptions in the portal. */ + public Builder setSubscriptionPause( + ConfigurationUpdateParams.Features.SubscriptionPause subscriptionPause) { + this.subscriptionPause = subscriptionPause; + return this; + } + /** Information about updating subscriptions in the portal. */ public Builder setSubscriptionUpdate( ConfigurationUpdateParams.Features.SubscriptionUpdate subscriptionUpdate) { @@ -1298,6 +1314,404 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SubscriptionPause { + /** + * Controls how long a subscription can be paused. Defaults to {@code interval_options} with a + * single one-month option. + */ + @SerializedName("duration") + Duration duration; + + /** + * Whether the feature is enabled. Customers can only pause subscriptions in the redesigned customer portal. + */ + @SerializedName("enabled") + Boolean enabled; + + /** + * 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; + + private SubscriptionPause( + Duration duration, Boolean enabled, Map extraParams) { + this.duration = duration; + this.enabled = enabled; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Duration duration; + + private Boolean enabled; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.Features.SubscriptionPause build() { + return new ConfigurationUpdateParams.Features.SubscriptionPause( + this.duration, this.enabled, this.extraParams); + } + + /** + * Controls how long a subscription can be paused. Defaults to {@code interval_options} with + * a single one-month option. + */ + public Builder setDuration( + ConfigurationUpdateParams.Features.SubscriptionPause.Duration duration) { + this.duration = duration; + return this; + } + + /** + * Whether the feature is enabled. Customers can only pause subscriptions in the redesigned customer portal. + */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + 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 ConfigurationUpdateParams.Features.SubscriptionPause#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 ConfigurationUpdateParams.Features.SubscriptionPause#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Duration { + /** + * 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; + + /** + * The preset pause durations customers can choose from. Required when {@code type} is + * {@code interval_options}. + */ + @SerializedName("interval_options") + Object intervalOptions; + + /** + * Required. Whether subscriptions can be paused indefinitely or for a + * preset duration. + */ + @SerializedName("type") + Type type; + + private Duration(Map extraParams, Object intervalOptions, Type type) { + this.extraParams = extraParams; + this.intervalOptions = intervalOptions; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object intervalOptions; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.Features.SubscriptionPause.Duration build() { + return new ConfigurationUpdateParams.Features.SubscriptionPause.Duration( + this.extraParams, this.intervalOptions, this.type); + } + + /** + * 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 + * ConfigurationUpdateParams.Features.SubscriptionPause.Duration#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 + * ConfigurationUpdateParams.Features.SubscriptionPause.Duration#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `intervalOptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * ConfigurationUpdateParams.Features.SubscriptionPause.Duration#intervalOptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addIntervalOption( + ConfigurationUpdateParams.Features.SubscriptionPause.Duration.IntervalOption + element) { + if (this.intervalOptions == null || this.intervalOptions instanceof EmptyParam) { + this.intervalOptions = + new ArrayList< + ConfigurationUpdateParams.Features.SubscriptionPause.Duration + .IntervalOption>(); + } + ((List) + this.intervalOptions) + .add(element); + return this; + } + + /** + * Add all elements to `intervalOptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * ConfigurationUpdateParams.Features.SubscriptionPause.Duration#intervalOptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllIntervalOption( + List + elements) { + if (this.intervalOptions == null || this.intervalOptions instanceof EmptyParam) { + this.intervalOptions = + new ArrayList< + ConfigurationUpdateParams.Features.SubscriptionPause.Duration + .IntervalOption>(); + } + ((List) + this.intervalOptions) + .addAll(elements); + return this; + } + + /** + * The preset pause durations customers can choose from. Required when {@code type} is + * {@code interval_options}. + */ + public Builder setIntervalOptions(EmptyParam intervalOptions) { + this.intervalOptions = intervalOptions; + return this; + } + + /** + * The preset pause durations customers can choose from. Required when {@code type} is + * {@code interval_options}. + */ + public Builder setIntervalOptions( + List + intervalOptions) { + this.intervalOptions = intervalOptions; + return this; + } + + /** + * Required. Whether subscriptions can be paused indefinitely or for a + * preset duration. + */ + public Builder setType( + ConfigurationUpdateParams.Features.SubscriptionPause.Duration.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IntervalOption { + /** + * 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. Specifies the pause duration unit. Either {@code day}, + * {@code week}, {@code month}, or {@code year}. + */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals in the pause duration. Defaults to 1. The maximum duration is + * three years. + */ + @SerializedName("interval_count") + Long intervalCount; + + private IntervalOption( + Map extraParams, Interval interval, Long intervalCount) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.Features.SubscriptionPause.Duration.IntervalOption + build() { + return new ConfigurationUpdateParams.Features.SubscriptionPause.Duration + .IntervalOption(this.extraParams, this.interval, this.intervalCount); + } + + /** + * 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 + * ConfigurationUpdateParams.Features.SubscriptionPause.Duration.IntervalOption#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 + * ConfigurationUpdateParams.Features.SubscriptionPause.Duration.IntervalOption#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. Specifies the pause duration unit. Either {@code day}, + * {@code week}, {@code month}, or {@code year}. + */ + public Builder setInterval( + ConfigurationUpdateParams.Features.SubscriptionPause.Duration.IntervalOption + .Interval + interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals in the pause duration. Defaults to 1. The maximum duration is + * three years. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("indefinite") + INDEFINITE("indefinite"), + + @SerializedName("interval_options") + INTERVAL_OPTIONS("interval_options"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SubscriptionUpdate { diff --git a/src/main/java/com/stripe/param/billingportal/SessionCreateParams.java b/src/main/java/com/stripe/param/billingportal/SessionCreateParams.java index 580da12b3632..a93a84e8e6a9 100644 --- a/src/main/java/com/stripe/param/billingportal/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/billingportal/SessionCreateParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class SessionCreateParams extends ApiRequestParams { + /** Behavior after the portal session expires. */ + @SerializedName("after_expiration") + AfterExpiration afterExpiration; + /** * The ID of an existing configuration to use for @@ -79,6 +83,7 @@ public class SessionCreateParams extends ApiRequestParams { String returnUrl; private SessionCreateParams( + AfterExpiration afterExpiration, String configuration, String customer, String customerAccount, @@ -88,6 +93,7 @@ private SessionCreateParams( Locale locale, String onBehalfOf, String returnUrl) { + this.afterExpiration = afterExpiration; this.configuration = configuration; this.customer = customer; this.customerAccount = customerAccount; @@ -104,6 +110,8 @@ public static Builder builder() { } public static class Builder { + private AfterExpiration afterExpiration; + private String configuration; private String customer; @@ -125,6 +133,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams build() { return new SessionCreateParams( + this.afterExpiration, this.configuration, this.customer, this.customerAccount, @@ -136,6 +145,12 @@ public SessionCreateParams build() { this.returnUrl); } + /** Behavior after the portal session expires. */ + public Builder setAfterExpiration(SessionCreateParams.AfterExpiration afterExpiration) { + this.afterExpiration = afterExpiration; + return this; + } + /** * The ID of an existing configuration to use @@ -255,6 +270,181 @@ public Builder setReturnUrl(String returnUrl) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AfterExpiration { + /** Configuration for authenticating the customer after the session expires. */ + @SerializedName("customer_login") + CustomerLogin customerLogin; + + /** + * 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. The behavior to apply when the session expires. */ + @SerializedName("type") + Type type; + + private AfterExpiration( + CustomerLogin customerLogin, Map extraParams, Type type) { + this.customerLogin = customerLogin; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CustomerLogin customerLogin; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.AfterExpiration build() { + return new SessionCreateParams.AfterExpiration( + this.customerLogin, this.extraParams, this.type); + } + + /** Configuration for authenticating the customer after the session expires. */ + public Builder setCustomerLogin( + SessionCreateParams.AfterExpiration.CustomerLogin customerLogin) { + this.customerLogin = customerLogin; + 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 + * SessionCreateParams.AfterExpiration#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 SessionCreateParams.AfterExpiration#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. The behavior to apply when the session expires. */ + public Builder setType(SessionCreateParams.AfterExpiration.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerLogin { + /** + * The Unix timestamp after which the customer can no longer recover this session. Leave unset + * to allow recovery without a deadline. + */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * 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; + + private CustomerLogin(Long expiresAt, Map extraParams) { + this.expiresAt = expiresAt; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAt; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.AfterExpiration.CustomerLogin build() { + return new SessionCreateParams.AfterExpiration.CustomerLogin( + this.expiresAt, this.extraParams); + } + + /** + * The Unix timestamp after which the customer can no longer recover this session. Leave + * unset to allow recovery without a deadline. + */ + public Builder setExpiresAt(Long expiresAt) { + this.expiresAt = expiresAt; + 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 SessionCreateParams.AfterExpiration.CustomerLogin#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 SessionCreateParams.AfterExpiration.CustomerLogin#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("customer_login") + CUSTOMER_LOGIN("customer_login"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class FlowData { @@ -275,6 +465,10 @@ public static class FlowData { @SerializedName("subscription_cancel") SubscriptionCancel subscriptionCancel; + /** Configuration when {@code flow_data.type=subscription_pause}. */ + @SerializedName("subscription_pause") + SubscriptionPause subscriptionPause; + /** Configuration when {@code flow_data.type=subscription_update}. */ @SerializedName("subscription_update") SubscriptionUpdate subscriptionUpdate; @@ -291,12 +485,14 @@ private FlowData( AfterCompletion afterCompletion, Map extraParams, SubscriptionCancel subscriptionCancel, + SubscriptionPause subscriptionPause, SubscriptionUpdate subscriptionUpdate, SubscriptionUpdateConfirm subscriptionUpdateConfirm, Type type) { this.afterCompletion = afterCompletion; this.extraParams = extraParams; this.subscriptionCancel = subscriptionCancel; + this.subscriptionPause = subscriptionPause; this.subscriptionUpdate = subscriptionUpdate; this.subscriptionUpdateConfirm = subscriptionUpdateConfirm; this.type = type; @@ -313,6 +509,8 @@ public static class Builder { private SubscriptionCancel subscriptionCancel; + private SubscriptionPause subscriptionPause; + private SubscriptionUpdate subscriptionUpdate; private SubscriptionUpdateConfirm subscriptionUpdateConfirm; @@ -325,6 +523,7 @@ public SessionCreateParams.FlowData build() { this.afterCompletion, this.extraParams, this.subscriptionCancel, + this.subscriptionPause, this.subscriptionUpdate, this.subscriptionUpdateConfirm, this.type); @@ -370,6 +569,13 @@ public Builder setSubscriptionCancel( return this; } + /** Configuration when {@code flow_data.type=subscription_pause}. */ + public Builder setSubscriptionPause( + SessionCreateParams.FlowData.SubscriptionPause subscriptionPause) { + this.subscriptionPause = subscriptionPause; + return this; + } + /** Configuration when {@code flow_data.type=subscription_update}. */ public Builder setSubscriptionUpdate( SessionCreateParams.FlowData.SubscriptionUpdate subscriptionUpdate) { @@ -928,6 +1134,78 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SubscriptionPause { + /** + * 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. The ID of the subscription to be paused. */ + @SerializedName("subscription") + String subscription; + + private SubscriptionPause(Map extraParams, String subscription) { + this.extraParams = extraParams; + this.subscription = subscription; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String subscription; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.FlowData.SubscriptionPause build() { + return new SessionCreateParams.FlowData.SubscriptionPause( + this.extraParams, this.subscription); + } + + /** + * 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 SessionCreateParams.FlowData.SubscriptionPause#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 SessionCreateParams.FlowData.SubscriptionPause#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. The ID of the subscription to be paused. */ + public Builder setSubscription(String subscription) { + this.subscription = subscription; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SubscriptionUpdate { @@ -1378,6 +1656,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("subscription_cancel") SUBSCRIPTION_CANCEL("subscription_cancel"), + @SerializedName("subscription_pause") + SUBSCRIPTION_PAUSE("subscription_pause"), + @SerializedName("subscription_update") SUBSCRIPTION_UPDATE("subscription_update"), diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 9c7d7ad142b8..488ece2f9485 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -86,7 +86,7 @@ public class SessionCreateParams extends ApiRequestParams { /** * Three-letter ISO currency code, * in lowercase. Must be a supported currency. - * Required in {@code setup} mode when {@code payment_method_types} is not set. + * Required in {@code setup} mode when {@code allowed_payment_method_types} is not set. */ @SerializedName("currency") String currency; @@ -821,7 +821,8 @@ public Builder setConsentCollection(SessionCreateParams.ConsentCollection consen /** * Three-letter ISO currency * code, in lowercase. Must be a supported - * currency. Required in {@code setup} mode when {@code payment_method_types} is not set. + * currency. Required in {@code setup} mode when {@code allowed_payment_method_types} is not + * set. */ public Builder setCurrency(String currency) { this.currency = currency; @@ -4839,7 +4840,10 @@ public static class LineItem { /** * Data used to generate a new Price object - * inline. One of {@code price} or {@code price_data} is required. + * inline, for dynamic + * pricing when the amount isn't known ahead of time. One of {@code price} or {@code + * price_data} is required when creating a new line item. */ @SerializedName("price_data") PriceData priceData; @@ -4980,7 +4984,10 @@ public Builder setPrice(String price) { /** * Data used to generate a new Price object - * inline. One of {@code price} or {@code price_data} is required. + * inline, for dynamic + * pricing when the amount isn't known ahead of time. One of {@code price} or {@code + * price_data} is required when creating a new line item. */ public Builder setPriceData(SessionCreateParams.LineItem.PriceData priceData) { this.priceData = priceData; @@ -15508,8 +15515,8 @@ public static class Pix { AmountIncludesIof amountIncludesIof; /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and + * 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). */ @SerializedName("expires_after_seconds") Long expiresAfterSeconds; @@ -15595,8 +15602,8 @@ public Builder setAmountIncludesIof( } /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. + * The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 + * and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). */ public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { this.expiresAfterSeconds = expiresAfterSeconds; @@ -21125,6 +21132,21 @@ public enum Type implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class InvoiceSettings { + /** + * The account tax IDs associated with the subscription. Will be set on invoices generated by + * the subscription. + */ + @SerializedName("account_tax_ids") + Object accountTaxIds; + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + Object customFields; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + String description; + /** * 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. @@ -21134,6 +21156,10 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + String footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -21141,8 +21167,18 @@ public static class InvoiceSettings { @SerializedName("issuer") Issuer issuer; - private InvoiceSettings(Map extraParams, Issuer issuer) { + private InvoiceSettings( + Object accountTaxIds, + Object customFields, + String description, + Map extraParams, + String footer, + Issuer issuer) { + this.accountTaxIds = accountTaxIds; + this.customFields = customFields; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -21151,14 +21187,132 @@ public static Builder builder() { } public static class Builder { + private Object accountTaxIds; + + private Object customFields; + + private String description; + private Map extraParams; + private String footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.SubscriptionData.InvoiceSettings build() { return new SessionCreateParams.SubscriptionData.InvoiceSettings( - this.extraParams, this.issuer); + this.accountTaxIds, + this.customFields, + this.description, + this.extraParams, + this.footer, + this.issuer); + } + + /** + * Add an element to `accountTaxIds` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SessionCreateParams.SubscriptionData.InvoiceSettings#accountTaxIds} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAccountTaxId(String element) { + if (this.accountTaxIds == null || this.accountTaxIds instanceof EmptyParam) { + this.accountTaxIds = new ArrayList(); + } + ((List) this.accountTaxIds).add(element); + return this; + } + + /** + * Add all elements to `accountTaxIds` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link SessionCreateParams.SubscriptionData.InvoiceSettings#accountTaxIds} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllAccountTaxId(List elements) { + if (this.accountTaxIds == null || this.accountTaxIds instanceof EmptyParam) { + this.accountTaxIds = new ArrayList(); + } + ((List) this.accountTaxIds).addAll(elements); + return this; + } + + /** + * The account tax IDs associated with the subscription. Will be set on invoices generated + * by the subscription. + */ + public Builder setAccountTaxIds(EmptyParam accountTaxIds) { + this.accountTaxIds = accountTaxIds; + return this; + } + + /** + * The account tax IDs associated with the subscription. Will be set on invoices generated + * by the subscription. + */ + public Builder setAccountTaxIds(List accountTaxIds) { + this.accountTaxIds = accountTaxIds; + return this; + } + + /** + * Add an element to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SessionCreateParams.SubscriptionData.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField( + SessionCreateParams.SubscriptionData.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList(); + } + ((List) + this.customFields) + .add(element); + return this; + } + + /** + * Add all elements to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SessionCreateParams.SubscriptionData.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList(); + } + ((List) + this.customFields) + .addAll(elements); + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields( + List customFields) { + this.customFields = customFields; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(String description) { + this.description = description; + return this; } /** @@ -21189,6 +21343,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Footer to be displayed on the invoice. */ + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -21200,6 +21360,105 @@ public Builder setIssuer( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomField { + /** + * 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. The name of the custom field. This may be up to 40 characters. + */ + @SerializedName("name") + String name; + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + @SerializedName("value") + String value; + + private CustomField(Map extraParams, String name, String value) { + this.extraParams = extraParams; + this.name = name; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String name; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.SubscriptionData.InvoiceSettings.CustomField build() { + return new SessionCreateParams.SubscriptionData.InvoiceSettings.CustomField( + this.extraParams, this.name, this.value); + } + + /** + * 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 + * SessionCreateParams.SubscriptionData.InvoiceSettings.CustomField#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 + * SessionCreateParams.SubscriptionData.InvoiceSettings.CustomField#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. The name of the custom field. This may be up to 40 + * characters. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { @@ -22422,6 +22681,9 @@ public enum Locale implements ApiRequestParams.EnumParam { @SerializedName("fr-CA") FR_CA("fr-CA"), + @SerializedName("hi-IN") + HI_IN("hi-IN"), + @SerializedName("hr") HR("hr"), diff --git a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java index 6da67a1a106f..983a8179eb18 100644 --- a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java @@ -64,6 +64,19 @@ public class SessionUpdateParams extends ApiRequestParams { @SerializedName("metadata") Object metadata; + /** + * A subset of parameters to apply to the PaymentIntent for Checkout Sessions in {@code payment} + * mode. + * + *

You can only update these parameters when {@code ui_mode} is {@code elements} and while the + * session is active. If the PaymentIntent requires customer action or confirmation, updating + * these parameters abandons the current payment attempt and returns the PaymentIntent to {@code + * requires_payment_method}. You can't update these parameters after the PaymentIntent begins + * processing, requires capture, succeeds, or is canceled. + */ + @SerializedName("payment_intent_data") + PaymentIntentData paymentIntentData; + /** The shipping rate options to apply to this Session. Up to a maximum of 5. */ @SerializedName("shipping_options") Object shippingOptions; @@ -74,12 +87,14 @@ private SessionUpdateParams( Map extraParams, List lineItems, Object metadata, + PaymentIntentData paymentIntentData, Object shippingOptions) { this.collectedInformation = collectedInformation; this.expand = expand; this.extraParams = extraParams; this.lineItems = lineItems; this.metadata = metadata; + this.paymentIntentData = paymentIntentData; this.shippingOptions = shippingOptions; } @@ -98,6 +113,8 @@ public static class Builder { private Object metadata; + private PaymentIntentData paymentIntentData; + private Object shippingOptions; /** Finalize and obtain parameter instance from this builder. */ @@ -108,6 +125,7 @@ public SessionUpdateParams build() { this.extraParams, this.lineItems, this.metadata, + this.paymentIntentData, this.shippingOptions); } @@ -249,6 +267,21 @@ public Builder setMetadata(Map metadata) { return this; } + /** + * A subset of parameters to apply to the PaymentIntent for Checkout Sessions in {@code payment} + * mode. + * + *

You can only update these parameters when {@code ui_mode} is {@code elements} and while + * the session is active. If the PaymentIntent requires customer action or confirmation, + * updating these parameters abandons the current payment attempt and returns the PaymentIntent + * to {@code requires_payment_method}. You can't update these parameters after the PaymentIntent + * begins processing, requires capture, succeeds, or is canceled. + */ + public Builder setPaymentIntentData(SessionUpdateParams.PaymentIntentData paymentIntentData) { + this.paymentIntentData = paymentIntentData; + return this; + } + /** * Add an element to `shippingOptions` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link @@ -707,7 +740,10 @@ public static class LineItem { /** * Data used to generate a new Price object - * inline. One of {@code price} or {@code price_data} is required when creating a new line item. + * inline, for dynamic + * pricing when the amount isn't known ahead of time. One of {@code price} or {@code + * price_data} is required when creating a new line item. */ @SerializedName("price_data") PriceData priceData; @@ -897,8 +933,10 @@ public Builder setPrice(EmptyParam price) { /** * Data used to generate a new Price object - * inline. One of {@code price} or {@code price_data} is required when creating a new line - * item. + * inline, for dynamic + * pricing when the amount isn't known ahead of time. One of {@code price} or {@code + * price_data} is required when creating a new line item. */ public Builder setPriceData(SessionUpdateParams.LineItem.PriceData priceData) { this.priceData = priceData; @@ -1859,6 +1897,359 @@ public enum TaxBehavior implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentIntentData { + /** + * An arbitrary string attached to the object. Often useful for displaying to users. Pass an + * empty string to clear a previously configured value. + */ + @SerializedName("description") + Object description; + + /** + * 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; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Object metadata; + + /** + * Indicates that you intend to make future payments + * with the payment method collected by this Checkout Session. + * + *

When setting this to {@code on_session}, Checkout will show a notice to the customer that + * their payment details will be saved. + * + *

When setting this to {@code off_session}, Checkout will show a notice to the customer that + * their payment details will be saved and used for future payments. + * + *

If a Customer has been provided or Checkout creates a new Customer, Checkout will attach + * the payment method to the Customer. + * + *

If Checkout does not create a Customer, the payment method is not attached to a Customer. + * To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. + * + *

When processing card payments, Checkout also uses {@code setup_future_usage} to + * dynamically optimize your payment flow and comply with regional legislation and network + * rules, such as SCA. + * + *

You must wrap any Checkout Session update that mutates {@code setup_future_usage} in {@code runServerUpdate} + * and await it before continuing with the payment. Pass an empty string to remove a previously + * supplied configuration. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + /** + * Text that appears on the customer's statement as the statement descriptor for a non-card + * charge. This value overrides the account's default statement descriptor. For information + * about requirements, including the 22-character limit, see the Statement + * Descriptor docs. + * + *

Setting this value for a card charge returns an error. For card charges, set the statement_descriptor_suffix + * instead. Pass an empty string to clear a previously configured value. + */ + @SerializedName("statement_descriptor") + Object statementDescriptor; + + /** + * Provides information about a card charge. Concatenated to the account's statement + * descriptor prefix to form the complete statement descriptor that appears on the + * customer's statement. Pass an empty string to clear a previously configured value. + */ + @SerializedName("statement_descriptor_suffix") + Object statementDescriptorSuffix; + + private PaymentIntentData( + Object description, + Map extraParams, + Object metadata, + ApiRequestParams.EnumParam setupFutureUsage, + Object statementDescriptor, + Object statementDescriptorSuffix) { + this.description = description; + this.extraParams = extraParams; + this.metadata = metadata; + this.setupFutureUsage = setupFutureUsage; + this.statementDescriptor = statementDescriptor; + this.statementDescriptorSuffix = statementDescriptorSuffix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object description; + + private Map extraParams; + + private Object metadata; + + private ApiRequestParams.EnumParam setupFutureUsage; + + private Object statementDescriptor; + + private Object statementDescriptorSuffix; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.PaymentIntentData build() { + return new SessionUpdateParams.PaymentIntentData( + this.description, + this.extraParams, + this.metadata, + this.setupFutureUsage, + this.statementDescriptor, + this.statementDescriptorSuffix); + } + + /** + * An arbitrary string attached to the object. Often useful for displaying to users. Pass an + * empty string to clear a previously configured value. + */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** + * An arbitrary string attached to the object. Often useful for displaying to users. Pass an + * empty string to clear a previously configured value. + */ + public Builder setDescription(EmptyParam description) { + this.description = description; + 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 + * SessionUpdateParams.PaymentIntentData#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 SessionUpdateParams.PaymentIntentData#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add a key/value pair to `metadata` 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 + * SessionUpdateParams.PaymentIntentData#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMetadata(String key, String value) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` 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 SessionUpdateParams.PaymentIntentData#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMetadata(Map map) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).putAll(map); + return this; + } + + /** + * Set of key-value pairs that you can + * attach to an object. This can be useful for storing additional information about the object + * in a structured format. Individual keys can be unset by posting an empty value to them. All + * keys can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + /** + * Set of key-value pairs that you can + * attach to an object. This can be useful for storing additional information about the object + * in a structured format. Individual keys can be unset by posting an empty value to them. All + * keys can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Indicates that you intend to make future + * payments with the payment method collected by this Checkout Session. + * + *

When setting this to {@code on_session}, Checkout will show a notice to the customer + * that their payment details will be saved. + * + *

When setting this to {@code off_session}, Checkout will show a notice to the customer + * that their payment details will be saved and used for future payments. + * + *

If a Customer has been provided or Checkout creates a new Customer, Checkout will attach + * the payment method to the Customer. + * + *

If Checkout does not create a Customer, the payment method is not attached to a + * Customer. To reuse the payment method, you can retrieve it from the Checkout Session's + * PaymentIntent. + * + *

When processing card payments, Checkout also uses {@code setup_future_usage} to + * dynamically optimize your payment flow and comply with regional legislation and network + * rules, such as SCA. + * + *

You must wrap any Checkout Session update that mutates {@code setup_future_usage} in {@code runServerUpdate} + * and await it before continuing with the payment. Pass an empty string to remove a + * previously supplied configuration. + */ + public Builder setSetupFutureUsage( + SessionUpdateParams.PaymentIntentData.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future + * payments with the payment method collected by this Checkout Session. + * + *

When setting this to {@code on_session}, Checkout will show a notice to the customer + * that their payment details will be saved. + * + *

When setting this to {@code off_session}, Checkout will show a notice to the customer + * that their payment details will be saved and used for future payments. + * + *

If a Customer has been provided or Checkout creates a new Customer, Checkout will attach + * the payment method to the Customer. + * + *

If Checkout does not create a Customer, the payment method is not attached to a + * Customer. To reuse the payment method, you can retrieve it from the Checkout Session's + * PaymentIntent. + * + *

When processing card payments, Checkout also uses {@code setup_future_usage} to + * dynamically optimize your payment flow and comply with regional legislation and network + * rules, such as SCA. + * + *

You must wrap any Checkout Session update that mutates {@code setup_future_usage} in {@code runServerUpdate} + * and await it before continuing with the payment. Pass an empty string to remove a + * previously supplied configuration. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Text that appears on the customer's statement as the statement descriptor for a non-card + * charge. This value overrides the account's default statement descriptor. For information + * about requirements, including the 22-character limit, see the Statement + * Descriptor docs. + * + *

Setting this value for a card charge returns an error. For card charges, set the statement_descriptor_suffix + * instead. Pass an empty string to clear a previously configured value. + */ + public Builder setStatementDescriptor(String statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + + /** + * Text that appears on the customer's statement as the statement descriptor for a non-card + * charge. This value overrides the account's default statement descriptor. For information + * about requirements, including the 22-character limit, see the Statement + * Descriptor docs. + * + *

Setting this value for a card charge returns an error. For card charges, set the statement_descriptor_suffix + * instead. Pass an empty string to clear a previously configured value. + */ + public Builder setStatementDescriptor(EmptyParam statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + + /** + * Provides information about a card charge. Concatenated to the account's statement + * descriptor prefix to form the complete statement descriptor that appears on the + * customer's statement. Pass an empty string to clear a previously configured value. + */ + public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { + this.statementDescriptorSuffix = statementDescriptorSuffix; + return this; + } + + /** + * Provides information about a card charge. Concatenated to the account's statement + * descriptor prefix to form the complete statement descriptor that appears on the + * customer's statement. Pass an empty string to clear a previously configured value. + */ + public Builder setStatementDescriptorSuffix(EmptyParam statementDescriptorSuffix) { + this.statementDescriptorSuffix = statementDescriptorSuffix; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ShippingOption { diff --git a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java index 2dc5ec283a89..434ea296e5ce 100644 --- a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java @@ -31,6 +31,13 @@ public class CardUpdateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The new financial account ID the card will be associated with. This field allows a card to be + * reassigned to a different financial account. + */ + @SerializedName("financial_account") + Object financialAccount; + /** * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a @@ -72,6 +79,7 @@ private CardUpdateParams( CancellationReason cancellationReason, List expand, Map extraParams, + Object financialAccount, Object metadata, Object personalizationDesign, Pin pin, @@ -81,6 +89,7 @@ private CardUpdateParams( this.cancellationReason = cancellationReason; this.expand = expand; this.extraParams = extraParams; + this.financialAccount = financialAccount; this.metadata = metadata; this.personalizationDesign = personalizationDesign; this.pin = pin; @@ -100,6 +109,8 @@ public static class Builder { private Map extraParams; + private Object financialAccount; + private Object metadata; private Object personalizationDesign; @@ -118,6 +129,7 @@ public CardUpdateParams build() { this.cancellationReason, this.expand, this.extraParams, + this.financialAccount, this.metadata, this.personalizationDesign, this.pin, @@ -184,6 +196,24 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * The new financial account ID the card will be associated with. This field allows a card to be + * reassigned to a different financial account. + */ + public Builder setFinancialAccount(String financialAccount) { + this.financialAccount = financialAccount; + return this; + } + + /** + * The new financial account ID the card will be associated with. This field allows a card to be + * reassigned to a different financial account. + */ + public Builder setFinancialAccount(EmptyParam financialAccount) { + this.financialAccount = financialAccount; + return this; + } + /** * Add a key/value pair to `metadata` 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 diff --git a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java index 6a3e18fe59e6..c2f6673567fb 100644 --- a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java @@ -639,27 +639,30 @@ public static class TaxId { /** * Required. Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, * {@code al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code - * au_arn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, - * {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code - * br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code - * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, - * {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code - * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, - * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code - * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code - * il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code - * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, - * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code - * my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, - * {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code - * pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, - * {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code - * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, - * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code - * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or - * {@code zw_tin} + * au_acn}, {@code au_arn}, {@code au_wpn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, + * {@code bb_tin}, {@code bd_bin}, {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code + * bj_ifu}, {@code bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code bw_vat}, + * {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, + * {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code + * ci_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, + * {@code cv_nif}, {@code cz_dic}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code + * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code + * fo_vat}, {@code fr_siren}, {@code fr_siret}, {@code fr_spi}, {@code gb_vat}, {@code + * ge_vat}, {@code gh_tin}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, + * {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code + * is_kt}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code + * ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, + * {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_cf}, {@code + * md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mu_vat}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code mz_nuit}, {@code ng_tin}, {@code + * no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_bn}, {@code nz_gst}, {@code om_vat}, + * {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code pt_nif}, {@code py_ruc}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sm_coe}, {@code sn_ninea}, {@code sr_fin}, {@code + * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tt_bir}, {@code tt_vat}, + * {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code + * uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, + * {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -722,27 +725,30 @@ public Builder putAllExtraParam(Map map) { /** * Required. Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, * {@code al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code - * au_arn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, {@code bb_tin}, {@code bd_bin}, - * {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code bj_ifu}, {@code bo_tin}, {@code - * br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code - * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, - * {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code - * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, - * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, - * {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code - * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, - * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code - * jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, - * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code - * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, - * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code - * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code - * ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code - * sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code - * tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, - * {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code - * za_vat}, {@code zm_tin}, or {@code zw_tin} + * au_acn}, {@code au_arn}, {@code au_wpn}, {@code aw_tin}, {@code az_tin}, {@code ba_tin}, + * {@code bb_tin}, {@code bd_bin}, {@code bf_ifu}, {@code bg_uic}, {@code bh_vat}, {@code + * bj_ifu}, {@code bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code bw_vat}, + * {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, + * {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code ch_uid}, {@code ch_vat}, {@code + * ci_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, + * {@code cv_nif}, {@code cz_dic}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code + * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code + * fo_vat}, {@code fr_siren}, {@code fr_siret}, {@code fr_spi}, {@code gb_vat}, {@code + * ge_vat}, {@code gh_tin}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, + * {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code + * is_kt}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code + * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_cf}, + * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mu_vat}, {@code + * mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code mz_nuit}, {@code ng_tin}, + * {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_bn}, {@code nz_gst}, {@code + * om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code pt_nif}, {@code py_ruc}, + * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code + * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sm_coe}, {@code sn_ninea}, {@code + * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tt_bir}, + * {@code tt_vat}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code + * us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, + * {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(CalculationCreateParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -778,9 +784,15 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("au_abn") AU_ABN("au_abn"), + @SerializedName("au_acn") + AU_ACN("au_acn"), + @SerializedName("au_arn") AU_ARN("au_arn"), + @SerializedName("au_wpn") + AU_WPN("au_wpn"), + @SerializedName("aw_tin") AW_TIN("aw_tin"), @@ -820,6 +832,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("bs_tin") BS_TIN("bs_tin"), + @SerializedName("bw_vat") + BW_VAT("bw_vat"), + @SerializedName("by_tin") BY_TIN("by_tin"), @@ -850,6 +865,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ch_vat") CH_VAT("ch_vat"), + @SerializedName("ci_vat") + CI_VAT("ci_vat"), + @SerializedName("cl_tin") CL_TIN("cl_tin"), @@ -868,6 +886,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cv_nif") CV_NIF("cv_nif"), + @SerializedName("cz_dic") + CZ_DIC("cz_dic"), + @SerializedName("de_stn") DE_STN("de_stn"), @@ -895,12 +916,24 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("fo_vat") FO_VAT("fo_vat"), + @SerializedName("fr_siren") + FR_SIREN("fr_siren"), + + @SerializedName("fr_siret") + FR_SIRET("fr_siret"), + + @SerializedName("fr_spi") + FR_SPI("fr_spi"), + @SerializedName("gb_vat") GB_VAT("gb_vat"), @SerializedName("ge_vat") GE_VAT("ge_vat"), + @SerializedName("gh_tin") + GH_TIN("gh_tin"), + @SerializedName("gi_tin") GI_TIN("gi_tin"), @@ -928,6 +961,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("in_gst") IN_GST("in_gst"), + @SerializedName("is_kt") + IS_KT("is_kt"), + @SerializedName("is_vat") IS_VAT("is_vat"), @@ -973,6 +1009,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ma_vat") MA_VAT("ma_vat"), + @SerializedName("md_cf") + MD_CF("md_cf"), + @SerializedName("md_vat") MD_VAT("md_vat"), @@ -985,6 +1024,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("mr_nif") MR_NIF("mr_nif"), + @SerializedName("mu_vat") + MU_VAT("mu_vat"), + @SerializedName("mx_rfc") MX_RFC("mx_rfc"), @@ -997,6 +1039,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("my_sst") MY_SST("my_sst"), + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + @SerializedName("ng_tin") NG_TIN("ng_tin"), @@ -1009,6 +1054,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("np_pan") NP_PAN("np_pan"), + @SerializedName("nz_bn") + NZ_BN("nz_bn"), + @SerializedName("nz_gst") NZ_GST("nz_gst"), @@ -1024,6 +1072,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("pl_nip") PL_NIP("pl_nip"), + @SerializedName("pt_nif") + PT_NIF("pt_nif"), + @SerializedName("py_ruc") PY_RUC("py_ruc"), @@ -1051,6 +1102,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("si_tin") SI_TIN("si_tin"), + @SerializedName("sm_coe") + SM_COE("sm_coe"), + @SerializedName("sn_ninea") SN_NINEA("sn_ninea"), @@ -1069,6 +1123,12 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("tr_tin") TR_TIN("tr_tin"), + @SerializedName("tt_bir") + TT_BIR("tt_bir"), + + @SerializedName("tt_vat") + TT_VAT("tt_vat"), + @SerializedName("tw_vat") TW_VAT("tw_vat"), diff --git a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java index bec8db214092..faa33687acd8 100644 --- a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java @@ -269,6 +269,10 @@ public static class CountryOptions { @SerializedName("bs") Bs bs; + /** Options for the registration in BW. */ + @SerializedName("bw") + Bw bw; + /** Options for the registration in BY. */ @SerializedName("by") By by; @@ -285,6 +289,10 @@ public static class CountryOptions { @SerializedName("ch") Ch ch; + /** Options for the registration in CI. */ + @SerializedName("ci") + Ci ci; + /** Options for the registration in CL. */ @SerializedName("cl") Cl cl; @@ -366,6 +374,10 @@ public static class CountryOptions { @SerializedName("ge") Ge ge; + /** Options for the registration in GH. */ + @SerializedName("gh") + Gh gh; + /** Options for the registration in GN. */ @SerializedName("gn") Gn gn; @@ -470,6 +482,10 @@ public static class CountryOptions { @SerializedName("mt") Mt mt; + /** Options for the registration in MU. */ + @SerializedName("mu") + Mu mu; + /** Options for the registration in MX. */ @SerializedName("mx") Mx mx; @@ -632,10 +648,12 @@ private CountryOptions( Bh bh, Bj bj, Bs bs, + Bw bw, By by, Ca ca, Cd cd, Ch ch, + Ci ci, Cl cl, Cm cm, Co co, @@ -655,6 +673,7 @@ private CountryOptions( Fr fr, Gb gb, Ge ge, + Gh gh, Gn gn, Gr gr, Hr hr, @@ -681,6 +700,7 @@ private CountryOptions( Mk mk, Mr mr, Mt mt, + Mu mu, Mx mx, My my, Ng ng, @@ -734,10 +754,12 @@ private CountryOptions( this.bh = bh; this.bj = bj; this.bs = bs; + this.bw = bw; this.by = by; this.ca = ca; this.cd = cd; this.ch = ch; + this.ci = ci; this.cl = cl; this.cm = cm; this.co = co; @@ -757,6 +779,7 @@ private CountryOptions( this.fr = fr; this.gb = gb; this.ge = ge; + this.gh = gh; this.gn = gn; this.gr = gr; this.hr = hr; @@ -783,6 +806,7 @@ private CountryOptions( this.mk = mk; this.mr = mr; this.mt = mt; + this.mu = mu; this.mx = mx; this.my = my; this.ng = ng; @@ -860,6 +884,8 @@ public static class Builder { private Bs bs; + private Bw bw; + private By by; private Ca ca; @@ -868,6 +894,8 @@ public static class Builder { private Ch ch; + private Ci ci; + private Cl cl; private Cm cm; @@ -906,6 +934,8 @@ public static class Builder { private Ge ge; + private Gh gh; + private Gn gn; private Gr gr; @@ -958,6 +988,8 @@ public static class Builder { private Mt mt; + private Mu mu; + private Mx mx; private My my; @@ -1050,10 +1082,12 @@ public RegistrationCreateParams.CountryOptions build() { this.bh, this.bj, this.bs, + this.bw, this.by, this.ca, this.cd, this.ch, + this.ci, this.cl, this.cm, this.co, @@ -1073,6 +1107,7 @@ public RegistrationCreateParams.CountryOptions build() { this.fr, this.gb, this.ge, + this.gh, this.gn, this.gr, this.hr, @@ -1099,6 +1134,7 @@ public RegistrationCreateParams.CountryOptions build() { this.mk, this.mr, this.mt, + this.mu, this.mx, this.my, this.ng, @@ -1239,6 +1275,12 @@ public Builder setBs(RegistrationCreateParams.CountryOptions.Bs bs) { return this; } + /** Options for the registration in BW. */ + public Builder setBw(RegistrationCreateParams.CountryOptions.Bw bw) { + this.bw = bw; + return this; + } + /** Options for the registration in BY. */ public Builder setBy(RegistrationCreateParams.CountryOptions.By by) { this.by = by; @@ -1263,6 +1305,12 @@ public Builder setCh(RegistrationCreateParams.CountryOptions.Ch ch) { return this; } + /** Options for the registration in CI. */ + public Builder setCi(RegistrationCreateParams.CountryOptions.Ci ci) { + this.ci = ci; + return this; + } + /** Options for the registration in CL. */ public Builder setCl(RegistrationCreateParams.CountryOptions.Cl cl) { this.cl = cl; @@ -1398,6 +1446,12 @@ public Builder setGe(RegistrationCreateParams.CountryOptions.Ge ge) { return this; } + /** Options for the registration in GH. */ + public Builder setGh(RegistrationCreateParams.CountryOptions.Gh gh) { + this.gh = gh; + return this; + } + /** Options for the registration in GN. */ public Builder setGn(RegistrationCreateParams.CountryOptions.Gn gn) { this.gn = gn; @@ -1554,6 +1608,12 @@ public Builder setMt(RegistrationCreateParams.CountryOptions.Mt mt) { return this; } + /** Options for the registration in MU. */ + public Builder setMu(RegistrationCreateParams.CountryOptions.Mu mu) { + this.mu = mu; + return this; + } + /** Options for the registration in MX. */ public Builder setMx(RegistrationCreateParams.CountryOptions.Mx mx) { this.mx = mx; @@ -4686,6 +4746,89 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Bw { + /** + * 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. Type of registration to be created in {@code country}. */ + @SerializedName("type") + Type type; + + private Bw(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public RegistrationCreateParams.CountryOptions.Bw build() { + return new RegistrationCreateParams.CountryOptions.Bw(this.extraParams, this.type); + } + + /** + * 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 RegistrationCreateParams.CountryOptions.Bw#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 RegistrationCreateParams.CountryOptions.Bw#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. Type of registration to be created in {@code country}. */ + public Builder setType(RegistrationCreateParams.CountryOptions.Bw.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("simplified") + SIMPLIFIED("simplified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class By { @@ -5328,6 +5471,89 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Ci { + /** + * 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. Type of registration to be created in {@code country}. */ + @SerializedName("type") + Type type; + + private Ci(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public RegistrationCreateParams.CountryOptions.Ci build() { + return new RegistrationCreateParams.CountryOptions.Ci(this.extraParams, this.type); + } + + /** + * 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 RegistrationCreateParams.CountryOptions.Ci#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 RegistrationCreateParams.CountryOptions.Ci#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. Type of registration to be created in {@code country}. */ + public Builder setType(RegistrationCreateParams.CountryOptions.Ci.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("simplified") + SIMPLIFIED("simplified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Cl { @@ -7990,6 +8216,89 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Gh { + /** + * 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. Type of registration to be created in {@code country}. */ + @SerializedName("type") + Type type; + + private Gh(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public RegistrationCreateParams.CountryOptions.Gh build() { + return new RegistrationCreateParams.CountryOptions.Gh(this.extraParams, this.type); + } + + /** + * 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 RegistrationCreateParams.CountryOptions.Gh#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 RegistrationCreateParams.CountryOptions.Gh#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. Type of registration to be created in {@code country}. */ + public Builder setType(RegistrationCreateParams.CountryOptions.Gh.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("simplified") + SIMPLIFIED("simplified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Gn { @@ -11852,6 +12161,89 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Mu { + /** + * 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. Type of registration to be created in {@code country}. */ + @SerializedName("type") + Type type; + + private Mu(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public RegistrationCreateParams.CountryOptions.Mu build() { + return new RegistrationCreateParams.CountryOptions.Mu(this.extraParams, this.type); + } + + /** + * 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 RegistrationCreateParams.CountryOptions.Mu#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 RegistrationCreateParams.CountryOptions.Mu#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. Type of registration to be created in {@code country}. */ + public Builder setType(RegistrationCreateParams.CountryOptions.Mu.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("simplified") + SIMPLIFIED("simplified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Mx { @@ -15798,6 +16190,10 @@ public static class Us { @SerializedName("type") Type type; + /** Options for the utility users tax registration. */ + @SerializedName("utility_users_tax") + UtilityUsersTax utilityUsersTax; + private Us( AdmissionsTax admissionsTax, AttendanceTax attendanceTax, @@ -15814,7 +16210,8 @@ private Us( String state, StateSalesTax stateSalesTax, TourismTax tourismTax, - Type type) { + Type type, + UtilityUsersTax utilityUsersTax) { this.admissionsTax = admissionsTax; this.attendanceTax = attendanceTax; this.entertainmentTax = entertainmentTax; @@ -15831,6 +16228,7 @@ private Us( this.stateSalesTax = stateSalesTax; this.tourismTax = tourismTax; this.type = type; + this.utilityUsersTax = utilityUsersTax; } public static Builder builder() { @@ -15870,6 +16268,8 @@ public static class Builder { private Type type; + private UtilityUsersTax utilityUsersTax; + /** Finalize and obtain parameter instance from this builder. */ public RegistrationCreateParams.CountryOptions.Us build() { return new RegistrationCreateParams.CountryOptions.Us( @@ -15888,7 +16288,8 @@ public RegistrationCreateParams.CountryOptions.Us build() { this.state, this.stateSalesTax, this.tourismTax, - this.type); + this.type, + this.utilityUsersTax); } /** Options for the admission tax registration. */ @@ -16025,6 +16426,13 @@ public Builder setType(RegistrationCreateParams.CountryOptions.Us.Type type) { this.type = type; return this; } + + /** Options for the utility users tax registration. */ + public Builder setUtilityUsersTax( + RegistrationCreateParams.CountryOptions.Us.UtilityUsersTax utilityUsersTax) { + this.utilityUsersTax = utilityUsersTax; + return this; + } } @Getter @@ -17039,8 +17447,7 @@ public static class Election { /** * A FIPS code - * representing the local jurisdiction. Supported FIPS codes are: {@code 003} (Allegheny - * County) and {@code 60000} (Philadelphia City). + * representing the local jurisdiction. */ @SerializedName("jurisdiction") String jurisdiction; @@ -17107,8 +17514,7 @@ public Builder putAllExtraParam(Map map) { /** * A FIPS - * code representing the local jurisdiction. Supported FIPS codes are: {@code 003} - * (Allegheny County) and {@code 60000} (Philadelphia City). + * code representing the local jurisdiction. */ public Builder setJurisdiction(String jurisdiction) { this.jurisdiction = jurisdiction; @@ -17227,6 +17633,87 @@ public Builder setJurisdiction(String jurisdiction) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class UtilityUsersTax { + /** + * 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 jurisdiction code representing the local + * jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + + private UtilityUsersTax(Map extraParams, String jurisdiction) { + this.extraParams = extraParams; + this.jurisdiction = jurisdiction; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String jurisdiction; + + /** Finalize and obtain parameter instance from this builder. */ + public RegistrationCreateParams.CountryOptions.Us.UtilityUsersTax build() { + return new RegistrationCreateParams.CountryOptions.Us.UtilityUsersTax( + this.extraParams, this.jurisdiction); + } + + /** + * 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 RegistrationCreateParams.CountryOptions.Us.UtilityUsersTax#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 RegistrationCreateParams.CountryOptions.Us.UtilityUsersTax#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 jurisdiction code representing the local + * jurisdiction. + */ + public Builder setJurisdiction(String jurisdiction) { + this.jurisdiction = jurisdiction; + return this; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("admissions_tax") ADMISSIONS_TAX("admissions_tax"), @@ -17234,6 +17721,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("attendance_tax") ATTENDANCE_TAX("attendance_tax"), + @SerializedName("digital_excise_tax") + DIGITAL_EXCISE_TAX("digital_excise_tax"), + @SerializedName("entertainment_tax") ENTERTAINMENT_TAX("entertainment_tax"), @@ -17271,7 +17761,10 @@ public enum Type implements ApiRequestParams.EnumParam { STATE_SALES_TAX("state_sales_tax"), @SerializedName("tourism_tax") - TOURISM_TAX("tourism_tax"); + TOURISM_TAX("tourism_tax"), + + @SerializedName("utility_users_tax") + UTILITY_USERS_TAX("utility_users_tax"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java index 024112688efd..7f4f28675ea3 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java @@ -47,6 +47,10 @@ public class ConfigurationCreateParams extends ApiRequestParams { @SerializedName("offline") Object offline; + /** Configurations for reader security settings. */ + @SerializedName("reader_security") + Object readerSecurity; + /** Reboot time settings for readers. that support customized reboot time configuration. */ @SerializedName("reboot_window") RebootWindow rebootWindow; @@ -59,6 +63,10 @@ public class ConfigurationCreateParams extends ApiRequestParams { @SerializedName("stripe_s710") StripeS710 stripeS710; + /** An object containing device type specific settings for Stripe T600 readers. */ + @SerializedName("stripe_t600") + StripeT600 stripeT600; + /** Tipping configurations for readers that support on-reader tips. */ @SerializedName("tipping") Object tipping; @@ -95,9 +103,11 @@ private ConfigurationCreateParams( Map extraParams, String name, Object offline, + Object readerSecurity, RebootWindow rebootWindow, StripeS700 stripeS700, StripeS710 stripeS710, + StripeT600 stripeT600, Object tipping, VerifoneM425 verifoneM425, VerifoneP400 verifoneP400, @@ -112,9 +122,11 @@ private ConfigurationCreateParams( this.extraParams = extraParams; this.name = name; this.offline = offline; + this.readerSecurity = readerSecurity; this.rebootWindow = rebootWindow; this.stripeS700 = stripeS700; this.stripeS710 = stripeS710; + this.stripeT600 = stripeT600; this.tipping = tipping; this.verifoneM425 = verifoneM425; this.verifoneP400 = verifoneP400; @@ -143,12 +155,16 @@ public static class Builder { private Object offline; + private Object readerSecurity; + private RebootWindow rebootWindow; private StripeS700 stripeS700; private StripeS710 stripeS710; + private StripeT600 stripeT600; + private Object tipping; private VerifoneM425 verifoneM425; @@ -173,9 +189,11 @@ public ConfigurationCreateParams build() { this.extraParams, this.name, this.offline, + this.readerSecurity, this.rebootWindow, this.stripeS700, this.stripeS710, + this.stripeT600, this.tipping, this.verifoneM425, this.verifoneP400, @@ -279,6 +297,18 @@ public Builder setOffline(EmptyParam offline) { return this; } + /** Configurations for reader security settings. */ + public Builder setReaderSecurity(ConfigurationCreateParams.ReaderSecurity readerSecurity) { + this.readerSecurity = readerSecurity; + return this; + } + + /** Configurations for reader security settings. */ + public Builder setReaderSecurity(EmptyParam readerSecurity) { + this.readerSecurity = readerSecurity; + return this; + } + /** Reboot time settings for readers. that support customized reboot time configuration. */ public Builder setRebootWindow(ConfigurationCreateParams.RebootWindow rebootWindow) { this.rebootWindow = rebootWindow; @@ -297,6 +327,12 @@ public Builder setStripeS710(ConfigurationCreateParams.StripeS710 stripeS710) { return this; } + /** An object containing device type specific settings for Stripe T600 readers. */ + public Builder setStripeT600(ConfigurationCreateParams.StripeT600 stripeT600) { + this.stripeT600 = stripeT600; + return this; + } + /** Tipping configurations for readers that support on-reader tips. */ public Builder setTipping(ConfigurationCreateParams.Tipping tipping) { this.tipping = tipping; @@ -654,6 +690,83 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ReaderSecurity { + /** Passcode used to access a reader's admin menu. */ + @SerializedName("admin_menu_passcode") + Object adminMenuPasscode; + + /** + * 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; + + private ReaderSecurity(Object adminMenuPasscode, Map extraParams) { + this.adminMenuPasscode = adminMenuPasscode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object adminMenuPasscode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.ReaderSecurity build() { + return new ConfigurationCreateParams.ReaderSecurity( + this.adminMenuPasscode, this.extraParams); + } + + /** Passcode used to access a reader's admin menu. */ + public Builder setAdminMenuPasscode(String adminMenuPasscode) { + this.adminMenuPasscode = adminMenuPasscode; + return this; + } + + /** Passcode used to access a reader's admin menu. */ + public Builder setAdminMenuPasscode(EmptyParam adminMenuPasscode) { + this.adminMenuPasscode = adminMenuPasscode; + 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 + * ConfigurationCreateParams.ReaderSecurity#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 ConfigurationCreateParams.ReaderSecurity#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class RebootWindow { @@ -899,6 +1012,81 @@ public Builder setSplashscreen(EmptyParam splashscreen) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StripeT600 { + /** + * 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; + + /** A File ID representing an image you want to display on the reader. */ + @SerializedName("splashscreen") + Object splashscreen; + + private StripeT600(Map extraParams, Object splashscreen) { + this.extraParams = extraParams; + this.splashscreen = splashscreen; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object splashscreen; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.StripeT600 build() { + return new ConfigurationCreateParams.StripeT600(this.extraParams, this.splashscreen); + } + + /** + * 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 + * ConfigurationCreateParams.StripeT600#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 ConfigurationCreateParams.StripeT600#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A File ID representing an image you want to display on the reader. */ + public Builder setSplashscreen(String splashscreen) { + this.splashscreen = splashscreen; + return this; + } + + /** A File ID representing an image you want to display on the reader. */ + public Builder setSplashscreen(EmptyParam splashscreen) { + this.splashscreen = splashscreen; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Tipping { diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java index da4faa729d90..3952235fbe72 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java @@ -47,6 +47,10 @@ public class ConfigurationUpdateParams extends ApiRequestParams { @SerializedName("offline") Object offline; + /** Configurations for reader security settings. */ + @SerializedName("reader_security") + Object readerSecurity; + /** Reboot time settings for readers. that support customized reboot time configuration. */ @SerializedName("reboot_window") Object rebootWindow; @@ -59,6 +63,10 @@ public class ConfigurationUpdateParams extends ApiRequestParams { @SerializedName("stripe_s710") Object stripeS710; + /** An object containing device type specific settings for Stripe T600 readers. */ + @SerializedName("stripe_t600") + Object stripeT600; + /** Tipping configurations for readers that support on-reader tips. */ @SerializedName("tipping") Object tipping; @@ -95,9 +103,11 @@ private ConfigurationUpdateParams( Map extraParams, Object name, Object offline, + Object readerSecurity, Object rebootWindow, Object stripeS700, Object stripeS710, + Object stripeT600, Object tipping, Object verifoneM425, Object verifoneP400, @@ -112,9 +122,11 @@ private ConfigurationUpdateParams( this.extraParams = extraParams; this.name = name; this.offline = offline; + this.readerSecurity = readerSecurity; this.rebootWindow = rebootWindow; this.stripeS700 = stripeS700; this.stripeS710 = stripeS710; + this.stripeT600 = stripeT600; this.tipping = tipping; this.verifoneM425 = verifoneM425; this.verifoneP400 = verifoneP400; @@ -143,12 +155,16 @@ public static class Builder { private Object offline; + private Object readerSecurity; + private Object rebootWindow; private Object stripeS700; private Object stripeS710; + private Object stripeT600; + private Object tipping; private Object verifoneM425; @@ -173,9 +189,11 @@ public ConfigurationUpdateParams build() { this.extraParams, this.name, this.offline, + this.readerSecurity, this.rebootWindow, this.stripeS700, this.stripeS710, + this.stripeT600, this.tipping, this.verifoneM425, this.verifoneP400, @@ -297,6 +315,18 @@ public Builder setOffline(EmptyParam offline) { return this; } + /** Configurations for reader security settings. */ + public Builder setReaderSecurity(ConfigurationUpdateParams.ReaderSecurity readerSecurity) { + this.readerSecurity = readerSecurity; + return this; + } + + /** Configurations for reader security settings. */ + public Builder setReaderSecurity(EmptyParam readerSecurity) { + this.readerSecurity = readerSecurity; + return this; + } + /** Reboot time settings for readers. that support customized reboot time configuration. */ public Builder setRebootWindow(ConfigurationUpdateParams.RebootWindow rebootWindow) { this.rebootWindow = rebootWindow; @@ -333,6 +363,18 @@ public Builder setStripeS710(EmptyParam stripeS710) { return this; } + /** An object containing device type specific settings for Stripe T600 readers. */ + public Builder setStripeT600(ConfigurationUpdateParams.StripeT600 stripeT600) { + this.stripeT600 = stripeT600; + return this; + } + + /** An object containing device type specific settings for Stripe T600 readers. */ + public Builder setStripeT600(EmptyParam stripeT600) { + this.stripeT600 = stripeT600; + return this; + } + /** Tipping configurations for readers that support on-reader tips. */ public Builder setTipping(ConfigurationUpdateParams.Tipping tipping) { this.tipping = tipping; @@ -720,6 +762,83 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ReaderSecurity { + /** Passcode used to access a reader's admin menu. */ + @SerializedName("admin_menu_passcode") + Object adminMenuPasscode; + + /** + * 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; + + private ReaderSecurity(Object adminMenuPasscode, Map extraParams) { + this.adminMenuPasscode = adminMenuPasscode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object adminMenuPasscode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.ReaderSecurity build() { + return new ConfigurationUpdateParams.ReaderSecurity( + this.adminMenuPasscode, this.extraParams); + } + + /** Passcode used to access a reader's admin menu. */ + public Builder setAdminMenuPasscode(String adminMenuPasscode) { + this.adminMenuPasscode = adminMenuPasscode; + return this; + } + + /** Passcode used to access a reader's admin menu. */ + public Builder setAdminMenuPasscode(EmptyParam adminMenuPasscode) { + this.adminMenuPasscode = adminMenuPasscode; + 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 + * ConfigurationUpdateParams.ReaderSecurity#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 ConfigurationUpdateParams.ReaderSecurity#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class RebootWindow { @@ -965,6 +1084,81 @@ public Builder setSplashscreen(EmptyParam splashscreen) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StripeT600 { + /** + * 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; + + /** A File ID representing an image you want to display on the reader. */ + @SerializedName("splashscreen") + Object splashscreen; + + private StripeT600(Map extraParams, Object splashscreen) { + this.extraParams = extraParams; + this.splashscreen = splashscreen; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object splashscreen; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.StripeT600 build() { + return new ConfigurationUpdateParams.StripeT600(this.extraParams, this.splashscreen); + } + + /** + * 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 + * ConfigurationUpdateParams.StripeT600#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 ConfigurationUpdateParams.StripeT600#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A File ID representing an image you want to display on the reader. */ + public Builder setSplashscreen(String splashscreen) { + this.splashscreen = splashscreen; + return this; + } + + /** A File ID representing an image you want to display on the reader. */ + public Builder setSplashscreen(EmptyParam splashscreen) { + this.splashscreen = splashscreen; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Tipping { diff --git a/src/main/java/com/stripe/param/terminal/ReaderListParams.java b/src/main/java/com/stripe/param/terminal/ReaderListParams.java index 23f2e85483c8..5e2fe638c210 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderListParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderListParams.java @@ -252,6 +252,9 @@ public enum DeviceType implements ApiRequestParams.EnumParam { @SerializedName("simulated_stripe_s710") SIMULATED_STRIPE_S710("simulated_stripe_s710"), + @SerializedName("simulated_stripe_t600") + SIMULATED_STRIPE_T600("simulated_stripe_t600"), + @SerializedName("simulated_verifone_m425") SIMULATED_VERIFONE_M425("simulated_verifone_m425"), @@ -276,6 +279,9 @@ public enum DeviceType implements ApiRequestParams.EnumParam { @SerializedName("stripe_s710") STRIPE_S710("stripe_s710"), + @SerializedName("stripe_t600") + STRIPE_T600("stripe_t600"), + @SerializedName("verifone_P400") VERIFONE_P400("verifone_P400"), 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 5c17a3bb22a4..0d0ba055226e 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -1898,16 +1898,16 @@ public static class Branding { Map extraParams; /** - * ID of a file upload: - * An icon for the merchant. Must be square and at least 128px x 128px. + * ID of a file upload: An icon for + * the merchant. Must be square and at least 128px x 128px. */ @SerializedName("icon") String icon; /** - * ID of a file upload: - * A logo for the merchant that will be used in Checkout instead of the icon and without the - * merchant's name next to it if provided. Must be at least 128px x 128px. + * ID of a file upload: A logo for + * the merchant that will be used in Checkout instead of the icon and without the merchant's + * name next to it if provided. Must be at least 128px x 128px. */ @SerializedName("logo") String logo; @@ -1983,8 +1983,8 @@ public Builder putAllExtraParam(Map map) { } /** - * ID of a file - * upload: An icon for the merchant. Must be square and at least 128px x 128px. + * ID of a file upload: An icon for + * the merchant. Must be square and at least 128px x 128px. */ public Builder setIcon(String icon) { this.icon = icon; @@ -1992,9 +1992,9 @@ public Builder setIcon(String icon) { } /** - * ID of a file - * upload: A logo for the merchant that will be used in Checkout instead of the icon - * and without the merchant's name next to it if provided. Must be at least 128px x 128px. + * ID of a file upload: A logo for + * the merchant that will be used in Checkout instead of the icon and without the + * merchant's name next to it if provided. Must be at least 128px x 128px. */ public Builder setLogo(String logo) { this.logo = logo; @@ -8149,6 +8149,14 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) public static class Capabilities { + /** Capabilities that enable OutboundPayments to a bank account linked to this Account. */ + @SerializedName("bank_accounts") + BankAccounts bankAccounts; + + /** Capabilities that enable OutboundPayments to a card linked to this Account. */ + @SerializedName("cards") + Cards cards; + /** * 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. @@ -8163,62 +8171,957 @@ public static class Capabilities { @SerializedName("stripe_balance") StripeBalance stripeBalance; - private Capabilities(Map extraParams, StripeBalance stripeBalance) { - this.extraParams = extraParams; - this.stripeBalance = stripeBalance; - } + private Capabilities( + BankAccounts bankAccounts, + Cards cards, + Map extraParams, + StripeBalance stripeBalance) { + this.bankAccounts = bankAccounts; + this.cards = cards; + this.extraParams = extraParams; + this.stripeBalance = stripeBalance; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankAccounts bankAccounts; + + private Cards cards; + + private Map extraParams; + + private StripeBalance stripeBalance; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities( + this.bankAccounts, this.cards, this.extraParams, this.stripeBalance); + } + + /** Capabilities that enable OutboundPayments to a bank account linked to this Account. */ + public Builder setBankAccounts( + AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts bankAccounts) { + this.bankAccounts = bankAccounts; + return this; + } + + /** Capabilities that enable OutboundPayments to a card linked to this Account. */ + public Builder setCards( + AccountCreateParams.Configuration.Recipient.Capabilities.Cards cards) { + this.cards = cards; + 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.Configuration.Recipient.Capabilities#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.Configuration.Recipient.Capabilities#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). + */ + public Builder setStripeBalance( + AccountCreateParams.Configuration.Recipient.Capabilities.StripeBalance + stripeBalance) { + this.stripeBalance = stripeBalance; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankAccounts { + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over ACH + * rails. + */ + @SerializedName("ach") + Ach ach; + + /** + * 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; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over Fedwire + * or CHIPS. + */ + @SerializedName("fedwire") + Fedwire fedwire; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over FPS + * rails. + */ + @SerializedName("fps") + Fps fps; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over local + * networks. + */ + @SerializedName("local") + Local local; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over RTP + * rails. + */ + @SerializedName("rtp") + Rtp rtp; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over SEPA + * rails. + */ + @SerializedName("sepa") + Sepa sepa; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over SWIFT. + */ + @SerializedName("swift") + Swift swift; + + private BankAccounts( + Ach ach, + Map extraParams, + Fedwire fedwire, + Fps fps, + Local local, + Rtp rtp, + Sepa sepa, + Swift swift) { + this.ach = ach; + this.extraParams = extraParams; + this.fedwire = fedwire; + this.fps = fps; + this.local = local; + this.rtp = rtp; + this.sepa = sepa; + this.swift = swift; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Ach ach; + + private Map extraParams; + + private Fedwire fedwire; + + private Fps fps; + + private Local local; + + private Rtp rtp; + + private Sepa sepa; + + private Swift swift; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts( + this.ach, + this.extraParams, + this.fedwire, + this.fps, + this.local, + this.rtp, + this.sepa, + this.swift); + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over ACH + * rails. + */ + public Builder setAch( + AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Ach ach) { + this.ach = ach; + 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.Configuration.Recipient.Capabilities.BankAccounts#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.Configuration.Recipient.Capabilities.BankAccounts#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over Fedwire + * or CHIPS. + */ + public Builder setFedwire( + AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Fedwire + fedwire) { + this.fedwire = fedwire; + return this; + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over FPS + * rails. + */ + public Builder setFps( + AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Fps fps) { + this.fps = fps; + return this; + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over local + * networks. + */ + public Builder setLocal( + AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Local local) { + this.local = local; + return this; + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over RTP + * rails. + */ + public Builder setRtp( + AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Rtp rtp) { + this.rtp = rtp; + return this; + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over SEPA + * rails. + */ + public Builder setSepa( + AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Sepa sepa) { + this.sepa = sepa; + return this; + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over SWIFT. + */ + public Builder setSwift( + AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Swift swift) { + this.swift = swift; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Ach { + /** + * 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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Ach(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Ach + build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts + .Ach(this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Ach#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.Configuration.Recipient.Capabilities.BankAccounts.Ach#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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Fedwire { + /** + * 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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Fedwire(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Fedwire + build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts + .Fedwire(this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Fedwire#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.Configuration.Recipient.Capabilities.BankAccounts.Fedwire#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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Fps { + /** + * 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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Fps(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Fps + build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts + .Fps(this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Fps#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.Configuration.Recipient.Capabilities.BankAccounts.Fps#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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Local { + /** + * 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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Local(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Local + build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts + .Local(this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Local#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.Configuration.Recipient.Capabilities.BankAccounts.Local#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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Rtp { + /** + * 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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Rtp(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Rtp + build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts + .Rtp(this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Rtp#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.Configuration.Recipient.Capabilities.BankAccounts.Rtp#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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Sepa { + /** + * 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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Sepa(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private Boolean requested; - public static class Builder { - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Sepa + build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts + .Sepa(this.extraParams, this.requested); + } - private StripeBalance stripeBalance; + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Sepa#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; + } - /** Finalize and obtain parameter instance from this builder. */ - public AccountCreateParams.Configuration.Recipient.Capabilities build() { - return new AccountCreateParams.Configuration.Recipient.Capabilities( - this.extraParams, this.stripeBalance); + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Sepa#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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + 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.Configuration.Recipient.Capabilities#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Swift { + /** + * 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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Swift(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts.Swift + build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities.BankAccounts + .Swift(this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Swift#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.Configuration.Recipient.Capabilities.BankAccounts.Swift#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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } } - this.extraParams.put(key, value); - return this; } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Cards { /** - * 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.Configuration.Recipient.Capabilities#extraParams} - * for the field documentation. + * 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. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. */ - public Builder setStripeBalance( - AccountCreateParams.Configuration.Recipient.Capabilities.StripeBalance - stripeBalance) { - this.stripeBalance = stripeBalance; - return this; + @SerializedName("requested") + Boolean requested; + + private Cards(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities.Cards build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities.Cards( + this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.Cards#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.Configuration.Recipient.Capabilities.Cards#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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } } } @@ -9850,11 +10753,7 @@ public Builder setUserAgent(String userAgent) { @Getter @EqualsAndHashCode(callSuper = false) public static class TermsOfService { - /** - * Details on the Account's acceptance of the Stripe Services - * Agreement. - */ + /** Details on the Account's acceptance of the Stripe Services Agreement. */ @SerializedName("account") Account account; @@ -9888,11 +10787,7 @@ public AccountCreateParams.Identity.Attestations.TermsOfService build() { this.account, this.extraParams); } - /** - * Details on the Account's acceptance of the Stripe Services - * Agreement. - */ + /** Details on the Account's acceptance of the Stripe Services Agreement. */ public Builder setAccount( AccountCreateParams.Identity.Attestations.TermsOfService.Account account) { this.account = account; @@ -11109,8 +12004,8 @@ public static class BankAccountOwnershipVerification { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -11247,8 +12142,8 @@ public static class CompanyLicense { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -11380,8 +12275,8 @@ public static class CompanyMemorandumOfAssociation { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -11518,8 +12413,8 @@ public static class CompanyMinisterialDecree { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -11654,8 +12549,8 @@ public static class CompanyRegistrationVerification { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -11792,8 +12687,8 @@ public static class CompanyTaxIdVerification { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -11927,9 +12822,8 @@ public static class PrimaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -11998,8 +12892,8 @@ public Builder putAllExtraParam(Map map) { /** * Required. The file upload tokens - * referring to each side of the document. + * href="https://docs.stripe.com/api/files/create">file upload tokens referring to + * each side of the document. */ public Builder setFrontBack( AccountCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification.FrontBack @@ -12024,11 +12918,10 @@ public Builder setType( @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; @@ -12044,11 +12937,11 @@ public static class FrontBack { Map extraParams; /** - * Required. A file upload token - * representing the front of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller - * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * Required. A file + * upload token representing the front of the verification document. The purpose of + * the uploaded file should be 'identity_document'. The uploaded file needs to be a + * color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less + * than 10 MB in size. */ @SerializedName("front") String front; @@ -12079,11 +12972,11 @@ public static class Builder { } /** - * A file upload - * token representing the back of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setBack(String back) { this.back = back; @@ -12122,11 +13015,10 @@ public Builder putAllExtraParam(Map map) { /** * Required. A file upload token - * representing the front of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB - * in size. + * href="https://docs.stripe.com/api/files/create">file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setFront(String front) { this.front = front; @@ -12163,8 +13055,8 @@ public static class ProofOfAddress { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -12296,8 +13188,8 @@ public static class ProofOfRegistration { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -12524,8 +13416,8 @@ public static class ProofOfUltimateBeneficialOwnership { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -15377,8 +16269,8 @@ public static class CompanyAuthorization { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -15511,8 +16403,8 @@ public static class Passport { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -15643,9 +16535,8 @@ public static class PrimaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -15713,8 +16604,8 @@ public Builder putAllExtraParam(Map map) { /** * Required. The file upload tokens - * referring to each side of the document. + * href="https://docs.stripe.com/api/files/create">file upload tokens referring to + * each side of the document. */ public Builder setFrontBack( AccountCreateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack @@ -15738,11 +16629,10 @@ public Builder setType( @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; @@ -15758,11 +16648,11 @@ public static class FrontBack { Map extraParams; /** - * Required. A file upload token - * representing the front of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller - * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * Required. A file + * upload token representing the front of the verification document. The purpose of + * the uploaded file should be 'identity_document'. The uploaded file needs to be a + * color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less + * than 10 MB in size. */ @SerializedName("front") String front; @@ -15792,11 +16682,11 @@ public static class Builder { } /** - * A file upload - * token representing the back of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setBack(String back) { this.back = back; @@ -15835,11 +16725,10 @@ public Builder putAllExtraParam(Map map) { /** * Required. A file upload token - * representing the front of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB - * in size. + * href="https://docs.stripe.com/api/files/create">file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setFront(String front) { this.front = front; @@ -15875,9 +16764,8 @@ public static class SecondaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -15945,8 +16833,8 @@ public Builder putAllExtraParam(Map map) { /** * Required. The file upload tokens - * referring to each side of the document. + * href="https://docs.stripe.com/api/files/create">file upload tokens referring to + * each side of the document. */ public Builder setFrontBack( AccountCreateParams.Identity.Individual.Documents.SecondaryVerification.FrontBack @@ -15970,11 +16858,10 @@ public Builder setType( @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; @@ -15990,11 +16877,11 @@ public static class FrontBack { Map extraParams; /** - * Required. A file upload token - * representing the front of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller - * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * Required. A file + * upload token representing the front of the verification document. The purpose of + * the uploaded file should be 'identity_document'. The uploaded file needs to be a + * color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less + * than 10 MB in size. */ @SerializedName("front") String front; @@ -16025,11 +16912,11 @@ public static class Builder { } /** - * A file upload - * token representing the back of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setBack(String back) { this.back = back; @@ -16068,11 +16955,10 @@ public Builder putAllExtraParam(Map map) { /** * Required. A file upload token - * representing the front of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB - * in size. + * href="https://docs.stripe.com/api/files/create">file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setFront(String front) { this.front = front; @@ -16109,8 +16995,8 @@ public static class Visa { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; diff --git a/src/main/java/com/stripe/param/v2/core/AccountListParams.java b/src/main/java/com/stripe/param/v2/core/AccountListParams.java index a040186f6c4c..e6b4e85b916c 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountListParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountListParams.java @@ -35,7 +35,7 @@ public class AccountListParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The upper limit on the number of accounts returned by the List Account request. */ + /** The maximum number of items returned by the list request. */ @SerializedName("limit") Long limit; @@ -131,7 +131,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The upper limit on the number of accounts returned by the List Account request. */ + /** The maximum number of items returned by the list request. */ public Builder setLimit(Long limit) { this.limit = limit; return this; 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 248ea6317ec0..17e3d3546b24 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java @@ -2031,8 +2031,8 @@ public static class BankAccountOwnershipVerification { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -2169,8 +2169,8 @@ public static class CompanyLicense { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -2304,8 +2304,8 @@ public static class CompanyMemorandumOfAssociation { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -2442,8 +2442,8 @@ public static class CompanyMinisterialDecree { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -2580,8 +2580,8 @@ public static class CompanyRegistrationVerification { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -2718,8 +2718,8 @@ public static class CompanyTaxIdVerification { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -2855,9 +2855,8 @@ public static class PrimaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -2926,8 +2925,8 @@ public Builder putAllExtraParam(Map map) { /** * Required. The file upload tokens - * referring to each side of the document. + * href="https://docs.stripe.com/api/files/create">file upload tokens referring to + * each side of the document. */ public Builder setFrontBack( AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification @@ -2953,11 +2952,10 @@ public Builder setType( @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; @@ -2973,11 +2971,10 @@ public static class FrontBack { Map extraParams; /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 - * MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") String front; @@ -3008,11 +3005,11 @@ public static class Builder { } /** - * A file upload - * token representing the back of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setBack(String back) { this.back = back; @@ -3050,11 +3047,11 @@ public Builder putAllExtraParam(Map map) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setFront(String front) { this.front = front; @@ -3091,8 +3088,8 @@ public static class ProofOfAddress { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -3226,8 +3223,8 @@ public static class ProofOfRegistration { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -3455,8 +3452,8 @@ public static class ProofOfUltimateBeneficialOwnership { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -6336,8 +6333,8 @@ public static class CompanyAuthorization { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -6472,8 +6469,8 @@ public static class Passport { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -6604,9 +6601,8 @@ public static class PrimaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -6675,8 +6671,8 @@ public Builder putAllExtraParam(Map map) { /** * Required. The file upload tokens - * referring to each side of the document. + * href="https://docs.stripe.com/api/files/create">file upload tokens referring to + * each side of the document. */ public Builder setFrontBack( AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack @@ -6701,11 +6697,10 @@ public Builder setType( @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; @@ -6721,11 +6716,10 @@ public static class FrontBack { Map extraParams; /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 - * MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") String front; @@ -6756,11 +6750,11 @@ public static class Builder { } /** - * A file upload - * token representing the back of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setBack(String back) { this.back = back; @@ -6798,11 +6792,11 @@ public Builder putAllExtraParam(Map map) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setFront(String front) { this.front = front; @@ -6838,9 +6832,8 @@ public static class SecondaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -6909,8 +6902,8 @@ public Builder putAllExtraParam(Map map) { /** * Required. The file upload tokens - * referring to each side of the document. + * href="https://docs.stripe.com/api/files/create">file upload tokens referring to + * each side of the document. */ public Builder setFrontBack( AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification @@ -6936,11 +6929,10 @@ public Builder setType( @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; @@ -6956,11 +6948,10 @@ public static class FrontBack { Map extraParams; /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 - * MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") String front; @@ -6991,11 +6982,11 @@ public static class Builder { } /** - * A file upload - * token representing the back of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setBack(String back) { this.back = back; @@ -7033,11 +7024,11 @@ public Builder putAllExtraParam(Map map) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setFront(String front) { this.front = front; @@ -7074,8 +7065,8 @@ public static class Visa { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; 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 33f03bd27f4a..b6df38fe775e 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -1877,10 +1877,7 @@ public static class Merchant { @SerializedName("sepa_debit_payments") SepaDebitPayments sepaDebitPayments; - /** - * Settings for the default statement descriptor text. - */ + /** Settings for the default statement descriptor text. */ @SerializedName("statement_descriptor") StatementDescriptor statementDescriptor; @@ -2068,10 +2065,7 @@ public Builder setSepaDebitPayments( return this; } - /** - * Settings for the default statement descriptor text. - */ + /** Settings for the default statement descriptor text. */ public Builder setStatementDescriptor( AccountUpdateParams.Configuration.Merchant.StatementDescriptor statementDescriptor) { this.statementDescriptor = statementDescriptor; @@ -2180,16 +2174,16 @@ public static class Branding { Map extraParams; /** - * ID of a file upload: - * An icon for the merchant. Must be square and at least 128px x 128px. + * ID of a file upload: An icon for + * the merchant. Must be square and at least 128px x 128px. */ @SerializedName("icon") Object icon; /** - * ID of a file upload: - * A logo for the merchant that will be used in Checkout instead of the icon and without the - * merchant's name next to it if provided. Must be at least 128px x 128px. + * ID of a file upload: A logo for + * the merchant that will be used in Checkout instead of the icon and without the merchant's + * name next to it if provided. Must be at least 128px x 128px. */ @SerializedName("logo") Object logo; @@ -2265,8 +2259,8 @@ public Builder putAllExtraParam(Map map) { } /** - * ID of a file - * upload: An icon for the merchant. Must be square and at least 128px x 128px. + * ID of a file upload: An icon for + * the merchant. Must be square and at least 128px x 128px. */ public Builder setIcon(String icon) { this.icon = icon; @@ -2274,8 +2268,8 @@ public Builder setIcon(String icon) { } /** - * ID of a file - * upload: An icon for the merchant. Must be square and at least 128px x 128px. + * ID of a file upload: An icon for + * the merchant. Must be square and at least 128px x 128px. */ public Builder setIcon(EmptyParam icon) { this.icon = icon; @@ -2283,9 +2277,9 @@ public Builder setIcon(EmptyParam icon) { } /** - * ID of a file - * upload: A logo for the merchant that will be used in Checkout instead of the icon - * and without the merchant's name next to it if provided. Must be at least 128px x 128px. + * ID of a file upload: A logo for + * the merchant that will be used in Checkout instead of the icon and without the + * merchant's name next to it if provided. Must be at least 128px x 128px. */ public Builder setLogo(String logo) { this.logo = logo; @@ -2293,9 +2287,9 @@ public Builder setLogo(String logo) { } /** - * ID of a file - * upload: A logo for the merchant that will be used in Checkout instead of the icon - * and without the merchant's name next to it if provided. Must be at least 128px x 128px. + * ID of a file upload: A logo for + * the merchant that will be used in Checkout instead of the icon and without the + * merchant's name next to it if provided. Must be at least 128px x 128px. */ public Builder setLogo(EmptyParam logo) { this.logo = logo; @@ -8656,6 +8650,14 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) public static class Capabilities { + /** Capabilities that enable OutboundPayments to a bank account linked to this Account. */ + @SerializedName("bank_accounts") + BankAccounts bankAccounts; + + /** Capability that enable OutboundPayments to a debit card linked to this Account. */ + @SerializedName("cards") + Cards cards; + /** * 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. @@ -8670,7 +8672,13 @@ public static class Capabilities { @SerializedName("stripe_balance") StripeBalance stripeBalance; - private Capabilities(Map extraParams, StripeBalance stripeBalance) { + private Capabilities( + BankAccounts bankAccounts, + Cards cards, + Map extraParams, + StripeBalance stripeBalance) { + this.bankAccounts = bankAccounts; + this.cards = cards; this.extraParams = extraParams; this.stripeBalance = stripeBalance; } @@ -8680,6 +8688,10 @@ public static Builder builder() { } public static class Builder { + private BankAccounts bankAccounts; + + private Cards cards; + private Map extraParams; private StripeBalance stripeBalance; @@ -8687,7 +8699,21 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Configuration.Recipient.Capabilities build() { return new AccountUpdateParams.Configuration.Recipient.Capabilities( - this.extraParams, this.stripeBalance); + this.bankAccounts, this.cards, this.extraParams, this.stripeBalance); + } + + /** Capabilities that enable OutboundPayments to a bank account linked to this Account. */ + public Builder setBankAccounts( + AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts bankAccounts) { + this.bankAccounts = bankAccounts; + return this; + } + + /** Capability that enable OutboundPayments to a debit card linked to this Account. */ + public Builder setCards( + AccountUpdateParams.Configuration.Recipient.Capabilities.Cards cards) { + this.cards = cards; + return this; } /** @@ -8731,7 +8757,14 @@ public Builder setStripeBalance( @Getter @EqualsAndHashCode(callSuper = false) - public static class StripeBalance { + public static class BankAccounts { + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over ACH + * rails. + */ + @SerializedName("ach") + Ach ach; + /** * 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. @@ -8743,14 +8776,63 @@ public static class StripeBalance { Map extraParams; /** - * Enables this Account to receive /v1/transfers into their Stripe Balance (/v1/balance). + * Enables this Account to receive OutboundPayments to linked bank accounts over Fedwire + * or CHIPS. */ - @SerializedName("stripe_transfers") - StripeTransfers stripeTransfers; + @SerializedName("fedwire") + Fedwire fedwire; - private StripeBalance(Map extraParams, StripeTransfers stripeTransfers) { + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over FPS + * rails. + */ + @SerializedName("fps") + Fps fps; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over local + * networks. + */ + @SerializedName("local") + Local local; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over RTP + * rails. + */ + @SerializedName("rtp") + Rtp rtp; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over SEPA + * rails. + */ + @SerializedName("sepa") + Sepa sepa; + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over SWIFT. + */ + @SerializedName("swift") + Swift swift; + + private BankAccounts( + Ach ach, + Map extraParams, + Fedwire fedwire, + Fps fps, + Local local, + Rtp rtp, + Sepa sepa, + Swift swift) { + this.ach = ach; this.extraParams = extraParams; - this.stripeTransfers = stripeTransfers; + this.fedwire = fedwire; + this.fps = fps; + this.local = local; + this.rtp = rtp; + this.sepa = sepa; + this.swift = swift; } public static Builder builder() { @@ -8758,21 +8840,50 @@ public static Builder builder() { } public static class Builder { + private Ach ach; + private Map extraParams; - private StripeTransfers stripeTransfers; + private Fedwire fedwire; + + private Fps fps; + + private Local local; + + private Rtp rtp; + + private Sepa sepa; + + private Swift swift; /** Finalize and obtain parameter instance from this builder. */ - public AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance build() { - return new AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance( - this.extraParams, this.stripeTransfers); + public AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts( + this.ach, + this.extraParams, + this.fedwire, + this.fps, + this.local, + this.rtp, + this.sepa, + this.swift); + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over ACH + * rails. + */ + public Builder setAch( + AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Ach ach) { + this.ach = ach; + 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.Configuration.Recipient.Capabilities.StripeBalance#extraParams} + * AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -8787,7 +8898,7 @@ public Builder putExtraParam(String key, Object value) { * 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.Configuration.Recipient.Capabilities.StripeBalance#extraParams} + * AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -8799,21 +8910,69 @@ public Builder putAllExtraParam(Map map) { } /** - * Enables this Account to receive /v1/transfers into their Stripe Balance - * (/v1/balance). + * Enables this Account to receive OutboundPayments to linked bank accounts over Fedwire + * or CHIPS. */ - public Builder setStripeTransfers( - AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance - .StripeTransfers - stripeTransfers) { - this.stripeTransfers = stripeTransfers; + public Builder setFedwire( + AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Fedwire + fedwire) { + this.fedwire = fedwire; + return this; + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over FPS + * rails. + */ + public Builder setFps( + AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Fps fps) { + this.fps = fps; + return this; + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over local + * networks. + */ + public Builder setLocal( + AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Local local) { + this.local = local; + return this; + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over RTP + * rails. + */ + public Builder setRtp( + AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Rtp rtp) { + this.rtp = rtp; + return this; + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over SEPA + * rails. + */ + public Builder setSepa( + AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Sepa sepa) { + this.sepa = sepa; + return this; + } + + /** + * Enables this Account to receive OutboundPayments to linked bank accounts over SWIFT. + */ + public Builder setSwift( + AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Swift swift) { + this.swift = swift; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class StripeTransfers { + public static class Ach { /** * 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} @@ -8831,7 +8990,7 @@ public static class StripeTransfers { @SerializedName("requested") Boolean requested; - private StripeTransfers(Map extraParams, Boolean requested) { + private Ach(Map extraParams, Boolean requested) { this.extraParams = extraParams; this.requested = requested; } @@ -8846,18 +9005,17 @@ public static class Builder { private Boolean requested; /** Finalize and obtain parameter instance from this builder. */ - public AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance - .StripeTransfers + public AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Ach build() { - return new AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance - .StripeTransfers(this.extraParams, this.requested); + return new AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts + .Ach(this.extraParams, this.requested); } /** * 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.Configuration.Recipient.Capabilities.StripeBalance.StripeTransfers#extraParams} + * AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Ach#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -8872,7 +9030,7 @@ public Builder putExtraParam(String key, Object value) { * 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.Configuration.Recipient.Capabilities.StripeBalance.StripeTransfers#extraParams} + * AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Ach#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -8893,91 +9051,847 @@ public Builder setRequested(Boolean requested) { } } } - } - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Defaults { - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - @SerializedName("currency") - Object currency; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Fedwire { + /** + * 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; - /** - * 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; + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; - /** The Account's preferred locales (languages), ordered by preference. */ - @SerializedName("locales") - List locales; + private Fedwire(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } - /** Account profile information. */ - @SerializedName("profile") - Profile profile; + public static Builder builder() { + return new Builder(); + } - /** Default responsibilities held by either Stripe or the platform. */ - @SerializedName("responsibilities") - Responsibilities responsibilities; + public static class Builder { + private Map extraParams; - private Defaults( - Object currency, - Map extraParams, - List locales, - Profile profile, - Responsibilities responsibilities) { - this.currency = currency; - this.extraParams = extraParams; - this.locales = locales; - this.profile = profile; - this.responsibilities = responsibilities; - } + private Boolean requested; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Fedwire + build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts + .Fedwire(this.extraParams, this.requested); + } - public static class Builder { - private Object currency; + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Fedwire#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; + } - private Map extraParams; + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Fedwire#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - private List locales; + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } - private Profile profile; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Fps { + /** + * 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; - private Responsibilities responsibilities; + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; - /** Finalize and obtain parameter instance from this builder. */ - public AccountUpdateParams.Defaults build() { - return new AccountUpdateParams.Defaults( - this.currency, this.extraParams, this.locales, this.profile, this.responsibilities); - } + private Fps(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * Three-letter ISO currency - * code, in lowercase. Must be a supported - * currency. + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Fps + build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts + .Fps(this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Fps#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.Configuration.Recipient.Capabilities.BankAccounts.Fps#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Local { + /** + * 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; + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Local(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Local + build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts + .Local(this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Local#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.Configuration.Recipient.Capabilities.BankAccounts.Local#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Rtp { + /** + * 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; + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Rtp(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Rtp + build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts + .Rtp(this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Rtp#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.Configuration.Recipient.Capabilities.BankAccounts.Rtp#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Sepa { + /** + * 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; + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Sepa(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Sepa + build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts + .Sepa(this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Sepa#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.Configuration.Recipient.Capabilities.BankAccounts.Sepa#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Swift { + /** + * 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; + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Swift(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts.Swift + build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities.BankAccounts + .Swift(this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.BankAccounts.Swift#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.Configuration.Recipient.Capabilities.BankAccounts.Swift#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Cards { + /** + * 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; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Cards(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient.Capabilities.Cards build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities.Cards( + this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.Cards#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.Configuration.Recipient.Capabilities.Cards#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StripeBalance { + /** + * 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; + + /** + * Enables this Account to receive /v1/transfers into their Stripe Balance (/v1/balance). + */ + @SerializedName("stripe_transfers") + StripeTransfers stripeTransfers; + + private StripeBalance(Map extraParams, StripeTransfers stripeTransfers) { + this.extraParams = extraParams; + this.stripeTransfers = stripeTransfers; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private StripeTransfers stripeTransfers; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance( + this.extraParams, this.stripeTransfers); + } + + /** + * 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.Configuration.Recipient.Capabilities.StripeBalance#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.Configuration.Recipient.Capabilities.StripeBalance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Enables this Account to receive /v1/transfers into their Stripe Balance + * (/v1/balance). + */ + public Builder setStripeTransfers( + AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance + .StripeTransfers + stripeTransfers) { + this.stripeTransfers = stripeTransfers; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StripeTransfers { + /** + * 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; + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private StripeTransfers(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance + .StripeTransfers + build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance + .StripeTransfers(this.extraParams, this.requested); + } + + /** + * 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.Configuration.Recipient.Capabilities.StripeBalance.StripeTransfers#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.Configuration.Recipient.Capabilities.StripeBalance.StripeTransfers#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Defaults { + /** + * 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; + + /** The Account's preferred locales (languages), ordered by preference. */ + @SerializedName("locales") + List locales; + + /** + * Default payout methods per currency. Keys are three-letter ISO currency codes, in lowercase. + * Values are v2 Payout Method IDs. + */ + @SerializedName("payout_methods") + Map payoutMethods; + + /** Account profile information. */ + @SerializedName("profile") + Profile profile; + + /** Default responsibilities held by either Stripe or the platform. */ + @SerializedName("responsibilities") + Responsibilities responsibilities; + + private Defaults( + Object currency, + Map extraParams, + List locales, + Map payoutMethods, + Profile profile, + Responsibilities responsibilities) { + this.currency = currency; + this.extraParams = extraParams; + this.locales = locales; + this.payoutMethods = payoutMethods; + this.profile = profile; + this.responsibilities = responsibilities; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private List locales; + + private Map payoutMethods; + + private Profile profile; + + private Responsibilities responsibilities; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Defaults build() { + return new AccountUpdateParams.Defaults( + this.currency, + this.extraParams, + this.locales, + this.payoutMethods, + this.profile, + this.responsibilities); + } + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. */ public Builder setCurrency(EmptyParam currency) { this.currency = currency; @@ -9036,6 +9950,32 @@ public Builder addAllLocale(List elements) return this; } + /** + * Add a key/value pair to `payoutMethods` 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.Defaults#payoutMethods} for the field documentation. + */ + public Builder putPayoutMethod(String key, String value) { + if (this.payoutMethods == null) { + this.payoutMethods = new HashMap<>(); + } + this.payoutMethods.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `payoutMethods` 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.Defaults#payoutMethods} for the field documentation. + */ + public Builder putAllPayoutMethod(Map map) { + if (this.payoutMethods == null) { + this.payoutMethods = new HashMap<>(); + } + this.payoutMethods.putAll(map); + return this; + } + /** Account profile information. */ public Builder setProfile(AccountUpdateParams.Defaults.Profile profile) { this.profile = profile; @@ -10441,11 +11381,7 @@ public Builder setUserAgent(EmptyParam userAgent) { @Getter @EqualsAndHashCode(callSuper = false) public static class TermsOfService { - /** - * Details on the Account's acceptance of the Stripe Services - * Agreement. - */ + /** Details on the Account's acceptance of the Stripe Services Agreement. */ @SerializedName("account") Account account; @@ -10497,11 +11433,7 @@ public AccountUpdateParams.Identity.Attestations.TermsOfService build() { this.account, this.cryptoMoneyManager, this.extraParams, this.moneyManager); } - /** - * Details on the Account's acceptance of the Stripe Services - * Agreement. - */ + /** Details on the Account's acceptance of the Stripe Services Agreement. */ public Builder setAccount( AccountUpdateParams.Identity.Attestations.TermsOfService.Account account) { this.account = account; @@ -12128,8 +13060,8 @@ public static class BankAccountOwnershipVerification { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -12266,8 +13198,8 @@ public static class CompanyLicense { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -12399,8 +13331,8 @@ public static class CompanyMemorandumOfAssociation { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -12537,8 +13469,8 @@ public static class CompanyMinisterialDecree { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -12673,8 +13605,8 @@ public static class CompanyRegistrationVerification { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -12811,8 +13743,8 @@ public static class CompanyTaxIdVerification { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -12946,9 +13878,8 @@ public static class PrimaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -13017,8 +13948,8 @@ public Builder putAllExtraParam(Map map) { /** * Required. The file upload tokens - * referring to each side of the document. + * href="https://docs.stripe.com/api/files/create">file upload tokens referring to + * each side of the document. */ public Builder setFrontBack( AccountUpdateParams.Identity.BusinessDetails.Documents.PrimaryVerification.FrontBack @@ -13043,11 +13974,10 @@ public Builder setType( @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") Object back; @@ -13063,11 +13993,10 @@ public static class FrontBack { Map extraParams; /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 - * MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") Object front; @@ -13098,11 +14027,11 @@ public static class Builder { } /** - * A file upload - * token representing the back of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setBack(String back) { this.back = back; @@ -13110,11 +14039,11 @@ public Builder setBack(String back) { } /** - * A file upload - * token representing the back of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setBack(EmptyParam back) { this.back = back; @@ -13152,11 +14081,11 @@ public Builder putAllExtraParam(Map map) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setFront(String front) { this.front = front; @@ -13164,11 +14093,11 @@ public Builder setFront(String front) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setFront(EmptyParam front) { this.front = front; @@ -13205,8 +14134,8 @@ public static class ProofOfAddress { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -13338,8 +14267,8 @@ public static class ProofOfRegistration { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -13572,8 +14501,8 @@ public static class ProofOfUltimateBeneficialOwnership { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -16699,8 +17628,8 @@ public static class CompanyAuthorization { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -16833,8 +17762,8 @@ public static class Passport { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -16965,9 +17894,8 @@ public static class PrimaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -17035,8 +17963,8 @@ public Builder putAllExtraParam(Map map) { /** * Required. The file upload tokens - * referring to each side of the document. + * href="https://docs.stripe.com/api/files/create">file upload tokens referring to + * each side of the document. */ public Builder setFrontBack( AccountUpdateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack @@ -17060,11 +17988,10 @@ public Builder setType( @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") Object back; @@ -17080,11 +18007,10 @@ public static class FrontBack { Map extraParams; /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 - * MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") Object front; @@ -17114,11 +18040,11 @@ public static class Builder { } /** - * A file upload - * token representing the back of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setBack(String back) { this.back = back; @@ -17126,11 +18052,11 @@ public Builder setBack(String back) { } /** - * A file upload - * token representing the back of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setBack(EmptyParam back) { this.back = back; @@ -17168,11 +18094,11 @@ public Builder putAllExtraParam(Map map) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setFront(String front) { this.front = front; @@ -17180,11 +18106,11 @@ public Builder setFront(String front) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setFront(EmptyParam front) { this.front = front; @@ -17220,9 +18146,8 @@ public static class SecondaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -17290,8 +18215,8 @@ public Builder putAllExtraParam(Map map) { /** * Required. The file upload tokens - * referring to each side of the document. + * href="https://docs.stripe.com/api/files/create">file upload tokens referring to + * each side of the document. */ public Builder setFrontBack( AccountUpdateParams.Identity.Individual.Documents.SecondaryVerification.FrontBack @@ -17315,11 +18240,10 @@ public Builder setType( @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") Object back; @@ -17335,11 +18259,10 @@ public static class FrontBack { Map extraParams; /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 - * MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") Object front; @@ -17370,11 +18293,11 @@ public static class Builder { } /** - * A file upload - * token representing the back of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setBack(String back) { this.back = back; @@ -17382,11 +18305,11 @@ public Builder setBack(String back) { } /** - * A file upload - * token representing the back of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setBack(EmptyParam back) { this.back = back; @@ -17424,11 +18347,11 @@ public Builder putAllExtraParam(Map map) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setFront(String front) { this.front = front; @@ -17436,11 +18359,11 @@ public Builder setFront(String front) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the - * uploaded file should be 'identity_document'. The uploaded file needs to be a color - * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than - * 10 MB in size. + * A file upload token + * representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. */ public Builder setFront(EmptyParam front) { this.front = front; @@ -17477,8 +18400,8 @@ public static class Visa { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java index 84c0e0b09cfa..bff1ca6bec18 100644 --- a/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java @@ -1409,8 +1409,8 @@ public static class CompanyAuthorization { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -1536,8 +1536,8 @@ public static class Passport { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -1661,9 +1661,8 @@ public static class PrimaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -1727,9 +1726,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ public Builder setFrontBack( PersonCreateParams.Documents.PrimaryVerification.FrontBack frontBack) { @@ -1751,10 +1749,10 @@ public Builder setType(PersonCreateParams.Documents.PrimaryVerification.Type typ @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload token - * representing the back of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; @@ -1770,11 +1768,11 @@ public static class FrontBack { Map extraParams; /** - * Required. A file upload token - * representing the front of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * Required. A file + * upload token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. */ @SerializedName("front") String front; @@ -1803,11 +1801,10 @@ public PersonCreateParams.Documents.PrimaryVerification.FrontBack build() { } /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setBack(String back) { this.back = back; @@ -1843,11 +1840,11 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. A file upload token - * representing the front of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller - * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * Required. A file + * upload token representing the front of the verification document. The purpose of + * the uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. */ public Builder setFront(String front) { this.front = front; @@ -1882,9 +1879,8 @@ public static class SecondaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -1949,9 +1945,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ public Builder setFrontBack( PersonCreateParams.Documents.SecondaryVerification.FrontBack frontBack) { @@ -1973,10 +1968,10 @@ public Builder setType(PersonCreateParams.Documents.SecondaryVerification.Type t @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload token - * representing the back of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; @@ -1992,11 +1987,11 @@ public static class FrontBack { Map extraParams; /** - * Required. A file upload token - * representing the front of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * Required. A file + * upload token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. */ @SerializedName("front") String front; @@ -2025,11 +2020,10 @@ public PersonCreateParams.Documents.SecondaryVerification.FrontBack build() { } /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setBack(String back) { this.back = back; @@ -2067,11 +2061,11 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. A file upload token - * representing the front of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller - * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * Required. A file + * upload token representing the front of the verification document. The purpose of + * the uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. */ public Builder setFront(String front) { this.front = front; @@ -2107,8 +2101,8 @@ public static class Visa { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonListParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonListParams.java index c27d8412a607..a5b2993a97c2 100644 --- a/src/main/java/com/stripe/param/v2/core/accounts/PersonListParams.java +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonListParams.java @@ -20,7 +20,7 @@ public class PersonListParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The upper limit on the number of accounts returned by the List Account request. */ + /** The maximum number of items returned by the list request. */ @SerializedName("limit") Long limit; @@ -69,7 +69,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The upper limit on the number of accounts returned by the List Account request. */ + /** The maximum number of items returned by the list request. */ public Builder setLimit(Long limit) { this.limit = limit; return this; diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonTokenCreateParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonTokenCreateParams.java index 63681f5bf38c..1684f5ddcb4a 100644 --- a/src/main/java/com/stripe/param/v2/core/accounts/PersonTokenCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonTokenCreateParams.java @@ -1375,8 +1375,8 @@ public static class CompanyAuthorization { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -1504,8 +1504,8 @@ public static class Passport { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -1630,9 +1630,8 @@ public static class PrimaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -1696,9 +1695,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ public Builder setFrontBack( PersonTokenCreateParams.Documents.PrimaryVerification.FrontBack frontBack) { @@ -1720,10 +1718,10 @@ public Builder setType(PersonTokenCreateParams.Documents.PrimaryVerification.Typ @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload token - * representing the back of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; @@ -1739,10 +1737,10 @@ public static class FrontBack { Map extraParams; /** - * A file upload token - * representing the front of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") String front; @@ -1771,11 +1769,10 @@ public PersonTokenCreateParams.Documents.PrimaryVerification.FrontBack build() { } /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setBack(String back) { this.back = back; @@ -1813,11 +1810,10 @@ public Builder putAllExtraParam(Map map) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setFront(String front) { this.front = front; @@ -1852,9 +1848,8 @@ public static class SecondaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -1919,9 +1914,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ public Builder setFrontBack( PersonTokenCreateParams.Documents.SecondaryVerification.FrontBack frontBack) { @@ -1943,10 +1937,10 @@ public Builder setType(PersonTokenCreateParams.Documents.SecondaryVerification.T @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload token - * representing the back of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; @@ -1962,10 +1956,10 @@ public static class FrontBack { Map extraParams; /** - * A file upload token - * representing the front of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") String front; @@ -1994,11 +1988,10 @@ public PersonTokenCreateParams.Documents.SecondaryVerification.FrontBack build() } /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setBack(String back) { this.back = back; @@ -2036,11 +2029,10 @@ public Builder putAllExtraParam(Map map) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setFront(String front) { this.front = front; @@ -2076,8 +2068,8 @@ public static class Visa { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java index f4397bfacc09..1fc6f5610a5b 100644 --- a/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java @@ -1575,8 +1575,8 @@ public static class CompanyAuthorization { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -1702,8 +1702,8 @@ public static class Passport { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; @@ -1827,9 +1827,8 @@ public static class PrimaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -1893,9 +1892,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ public Builder setFrontBack( PersonUpdateParams.Documents.PrimaryVerification.FrontBack frontBack) { @@ -1917,10 +1915,10 @@ public Builder setType(PersonUpdateParams.Documents.PrimaryVerification.Type typ @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload token - * representing the back of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") Object back; @@ -1936,10 +1934,10 @@ public static class FrontBack { Map extraParams; /** - * A file upload token - * representing the front of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") Object front; @@ -1968,11 +1966,10 @@ public PersonUpdateParams.Documents.PrimaryVerification.FrontBack build() { } /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setBack(String back) { this.back = back; @@ -1980,11 +1977,10 @@ public Builder setBack(String back) { } /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setBack(EmptyParam back) { this.back = back; @@ -2020,11 +2016,10 @@ public Builder putAllExtraParam(Map map) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setFront(String front) { this.front = front; @@ -2032,11 +2027,10 @@ public Builder setFront(String front) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setFront(EmptyParam front) { this.front = front; @@ -2071,9 +2065,8 @@ public static class SecondaryVerification { Map extraParams; /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ @SerializedName("front_back") FrontBack frontBack; @@ -2138,9 +2131,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. The file upload tokens - * referring to each side of the document. + * Required. The file + * upload tokens referring to each side of the document. */ public Builder setFrontBack( PersonUpdateParams.Documents.SecondaryVerification.FrontBack frontBack) { @@ -2162,10 +2154,10 @@ public Builder setType(PersonUpdateParams.Documents.SecondaryVerification.Type t @EqualsAndHashCode(callSuper = false) public static class FrontBack { /** - * A file upload token - * representing the back of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("back") Object back; @@ -2181,10 +2173,10 @@ public static class FrontBack { Map extraParams; /** - * A file upload token - * representing the front of the verification document. The purpose of the uploaded file - * should be 'identity_document'. The uploaded file needs to be a color image (smaller than - * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + * A file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by + * 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ @SerializedName("front") Object front; @@ -2213,11 +2205,10 @@ public PersonUpdateParams.Documents.SecondaryVerification.FrontBack build() { } /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setBack(String back) { this.back = back; @@ -2225,11 +2216,10 @@ public Builder setBack(String back) { } /** - * A file upload - * token representing the back of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the back of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setBack(EmptyParam back) { this.back = back; @@ -2267,11 +2257,10 @@ public Builder putAllExtraParam(Map map) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setFront(String front) { this.front = front; @@ -2279,11 +2268,10 @@ public Builder setFront(String front) { } /** - * A file upload - * token representing the front of the verification document. The purpose of the uploaded - * file should be 'identity_document'. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * A file upload token representing + * the front of the verification document. The purpose of the uploaded file should be + * 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px + * by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. */ public Builder setFront(EmptyParam front) { this.front = front; @@ -2319,8 +2307,8 @@ public static class Visa { /** * Required. One or more document IDs returned by a file upload with a - * purpose value of {@code account_requirement}. + * href="https://docs.stripe.com/api/files/create">file upload with a purpose value of + * {@code account_requirement}. */ @SerializedName("files") List files; diff --git a/src/main/java/com/stripe/param/v2/core/vault/GbBankAccountCreateParams.java b/src/main/java/com/stripe/param/v2/core/vault/GbBankAccountCreateParams.java new file mode 100644 index 000000000000..bfdda2a83dc2 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/vault/GbBankAccountCreateParams.java @@ -0,0 +1,157 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core.vault; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class GbBankAccountCreateParams extends ApiRequestParams { + /** The Account Number of the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Closed Enum. The type of the bank account (checking or savings). */ + @SerializedName("bank_account_type") + BankAccountType bankAccountType; + + /** Required. The currency of the bank account. */ + @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; + + /** The IBAN of the bank account. */ + @SerializedName("iban") + String iban; + + /** The Sort Code of the bank account. */ + @SerializedName("sort_code") + String sortCode; + + private GbBankAccountCreateParams( + String accountNumber, + BankAccountType bankAccountType, + String currency, + Map extraParams, + String iban, + String sortCode) { + this.accountNumber = accountNumber; + this.bankAccountType = bankAccountType; + this.currency = currency; + this.extraParams = extraParams; + this.iban = iban; + this.sortCode = sortCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private BankAccountType bankAccountType; + + private String currency; + + private Map extraParams; + + private String iban; + + private String sortCode; + + /** Finalize and obtain parameter instance from this builder. */ + public GbBankAccountCreateParams build() { + return new GbBankAccountCreateParams( + this.accountNumber, + this.bankAccountType, + this.currency, + this.extraParams, + this.iban, + this.sortCode); + } + + /** The Account Number of the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Closed Enum. The type of the bank account (checking or savings). */ + public Builder setBankAccountType(GbBankAccountCreateParams.BankAccountType bankAccountType) { + this.bankAccountType = bankAccountType; + return this; + } + + /** Required. The currency of the bank account. */ + 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 + * GbBankAccountCreateParams#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 GbBankAccountCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The IBAN of the bank account. */ + public Builder setIban(String iban) { + this.iban = iban; + return this; + } + + /** The Sort Code of the bank account. */ + public Builder setSortCode(String sortCode) { + this.sortCode = sortCode; + return this; + } + } + + public enum BankAccountType implements ApiRequestParams.EnumParam { + @SerializedName("checking") + CHECKING("checking"), + + @SerializedName("savings") + SAVINGS("savings"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BankAccountType(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/vault/GbBankAccountListParams.java b/src/main/java/com/stripe/param/v2/core/vault/GbBankAccountListParams.java new file mode 100644 index 000000000000..3d7e78d1eeee --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/vault/GbBankAccountListParams.java @@ -0,0 +1,78 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core.vault; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class GbBankAccountListParams extends ApiRequestParams { + /** + * 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; + + /** Optionally set the maximum number of results per page. Defaults to 10. */ + @SerializedName("limit") + Long limit; + + private GbBankAccountListParams(Map extraParams, Long limit) { + this.extraParams = extraParams; + this.limit = limit; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long limit; + + /** Finalize and obtain parameter instance from this builder. */ + public GbBankAccountListParams build() { + return new GbBankAccountListParams(this.extraParams, this.limit); + } + + /** + * 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 + * GbBankAccountListParams#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 GbBankAccountListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Optionally set the maximum number of results per page. Defaults to 10. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountConfirmMicrodepositsParams.java b/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountConfirmMicrodepositsParams.java new file mode 100644 index 000000000000..d2594269dce7 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountConfirmMicrodepositsParams.java @@ -0,0 +1,124 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core.vault; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class UsBankAccountConfirmMicrodepositsParams extends ApiRequestParams { + /** + * Two amounts received through Send Microdeposits must match the input to Confirm Microdeposits + * to verify US Bank Account. + */ + @SerializedName("amounts") + List amounts; + + /** + * Descriptor code received through Send Microdeposits must match the input to Confirm + * Microdeposits to verify US Bank Account. + */ + @SerializedName("descriptor_code") + String descriptorCode; + + /** + * 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; + + private UsBankAccountConfirmMicrodepositsParams( + List amounts, String descriptorCode, Map extraParams) { + this.amounts = amounts; + this.descriptorCode = descriptorCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List amounts; + + private String descriptorCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public UsBankAccountConfirmMicrodepositsParams build() { + return new UsBankAccountConfirmMicrodepositsParams( + this.amounts, this.descriptorCode, this.extraParams); + } + + /** + * Add an element to `amounts` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * UsBankAccountConfirmMicrodepositsParams#amounts} for the field documentation. + */ + public Builder addAmount(Long element) { + if (this.amounts == null) { + this.amounts = new ArrayList<>(); + } + this.amounts.add(element); + return this; + } + + /** + * Add all elements to `amounts` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * UsBankAccountConfirmMicrodepositsParams#amounts} for the field documentation. + */ + public Builder addAllAmount(List elements) { + if (this.amounts == null) { + this.amounts = new ArrayList<>(); + } + this.amounts.addAll(elements); + return this; + } + + /** + * Descriptor code received through Send Microdeposits must match the input to Confirm + * Microdeposits to verify US Bank Account. + */ + public Builder setDescriptorCode(String descriptorCode) { + this.descriptorCode = descriptorCode; + 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 + * UsBankAccountConfirmMicrodepositsParams#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 UsBankAccountConfirmMicrodepositsParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountCreateParams.java b/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountCreateParams.java new file mode 100644 index 000000000000..fbfcc96efce7 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountCreateParams.java @@ -0,0 +1,169 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core.vault; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class UsBankAccountCreateParams extends ApiRequestParams { + /** Required. The account number of the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Closed Enum. The type of the bank account (checking or savings). */ + @SerializedName("bank_account_type") + BankAccountType bankAccountType; + + /** Required. The currency of the bank account. */ + @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; + + /** + * The fedwire routing number of the bank account. Note that certain banks have the same ACH and + * wire routing number. + */ + @SerializedName("fedwire_routing_number") + String fedwireRoutingNumber; + + /** + * The ACH routing number of the bank account. Note that certain banks have the same ACH and wire + * routing number. + */ + @SerializedName("routing_number") + String routingNumber; + + private UsBankAccountCreateParams( + String accountNumber, + BankAccountType bankAccountType, + String currency, + Map extraParams, + String fedwireRoutingNumber, + String routingNumber) { + this.accountNumber = accountNumber; + this.bankAccountType = bankAccountType; + this.currency = currency; + this.extraParams = extraParams; + this.fedwireRoutingNumber = fedwireRoutingNumber; + this.routingNumber = routingNumber; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private BankAccountType bankAccountType; + + private String currency; + + private Map extraParams; + + private String fedwireRoutingNumber; + + private String routingNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public UsBankAccountCreateParams build() { + return new UsBankAccountCreateParams( + this.accountNumber, + this.bankAccountType, + this.currency, + this.extraParams, + this.fedwireRoutingNumber, + this.routingNumber); + } + + /** Required. The account number of the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Closed Enum. The type of the bank account (checking or savings). */ + public Builder setBankAccountType(UsBankAccountCreateParams.BankAccountType bankAccountType) { + this.bankAccountType = bankAccountType; + return this; + } + + /** Required. The currency of the bank account. */ + 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 + * UsBankAccountCreateParams#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 UsBankAccountCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The fedwire routing number of the bank account. Note that certain banks have the same ACH and + * wire routing number. + */ + public Builder setFedwireRoutingNumber(String fedwireRoutingNumber) { + this.fedwireRoutingNumber = fedwireRoutingNumber; + return this; + } + + /** + * The ACH routing number of the bank account. Note that certain banks have the same ACH and + * wire routing number. + */ + public Builder setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + } + + public enum BankAccountType implements ApiRequestParams.EnumParam { + @SerializedName("checking") + CHECKING("checking"), + + @SerializedName("savings") + SAVINGS("savings"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BankAccountType(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountListParams.java b/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountListParams.java new file mode 100644 index 000000000000..8ddee52cdfc8 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountListParams.java @@ -0,0 +1,114 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core.vault; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class UsBankAccountListParams extends ApiRequestParams { + /** + * 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; + + /** Optionally set the maximum number of results per page. Defaults to 10. */ + @SerializedName("limit") + Long limit; + + /** Closed Enum. Optionally filter by verification status. */ + @SerializedName("verification_status") + VerificationStatus verificationStatus; + + private UsBankAccountListParams( + Map extraParams, Long limit, VerificationStatus verificationStatus) { + this.extraParams = extraParams; + this.limit = limit; + this.verificationStatus = verificationStatus; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long limit; + + private VerificationStatus verificationStatus; + + /** Finalize and obtain parameter instance from this builder. */ + public UsBankAccountListParams build() { + return new UsBankAccountListParams(this.extraParams, this.limit, this.verificationStatus); + } + + /** + * 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 + * UsBankAccountListParams#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 UsBankAccountListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Optionally set the maximum number of results per page. Defaults to 10. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + + /** Closed Enum. Optionally filter by verification status. */ + public Builder setVerificationStatus( + UsBankAccountListParams.VerificationStatus verificationStatus) { + this.verificationStatus = verificationStatus; + return this; + } + } + + public enum VerificationStatus implements ApiRequestParams.EnumParam { + @SerializedName("awaiting_verification") + AWAITING_VERIFICATION("awaiting_verification"), + + @SerializedName("unverified") + UNVERIFIED("unverified"), + + @SerializedName("verification_failed") + VERIFICATION_FAILED("verification_failed"), + + @SerializedName("verified") + VERIFIED("verified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + VerificationStatus(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountUpdateParams.java new file mode 100644 index 000000000000..af96496ca339 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountUpdateParams.java @@ -0,0 +1,121 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core.vault; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class UsBankAccountUpdateParams extends ApiRequestParams { + /** + * 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; + + /** + * The bank account's Fedwire routing number can be provided for update if it was empty + * previously. + */ + @SerializedName("fedwire_routing_number") + Object fedwireRoutingNumber; + + /** + * The bank account's ACH routing number can be provided for update if it was empty previously. + */ + @SerializedName("routing_number") + Object routingNumber; + + private UsBankAccountUpdateParams( + Map extraParams, Object fedwireRoutingNumber, Object routingNumber) { + this.extraParams = extraParams; + this.fedwireRoutingNumber = fedwireRoutingNumber; + this.routingNumber = routingNumber; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object fedwireRoutingNumber; + + private Object routingNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public UsBankAccountUpdateParams build() { + return new UsBankAccountUpdateParams( + this.extraParams, this.fedwireRoutingNumber, this.routingNumber); + } + + /** + * 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 + * UsBankAccountUpdateParams#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 UsBankAccountUpdateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The bank account's Fedwire routing number can be provided for update if it was empty + * previously. + */ + public Builder setFedwireRoutingNumber(String fedwireRoutingNumber) { + this.fedwireRoutingNumber = fedwireRoutingNumber; + return this; + } + + /** + * The bank account's Fedwire routing number can be provided for update if it was empty + * previously. + */ + public Builder setFedwireRoutingNumber(EmptyParam fedwireRoutingNumber) { + this.fedwireRoutingNumber = fedwireRoutingNumber; + return this; + } + + /** + * The bank account's ACH routing number can be provided for update if it was empty previously. + */ + public Builder setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** + * The bank account's ACH routing number can be provided for update if it was empty previously. + */ + public Builder setRoutingNumber(EmptyParam routingNumber) { + this.routingNumber = routingNumber; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/AdjustmentListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/AdjustmentListParams.java new file mode 100644 index 000000000000..fc6f606d7b9e --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/AdjustmentListParams.java @@ -0,0 +1,253 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class AdjustmentListParams extends ApiRequestParams { + /** + * Filter for Adjustments linked to a specific flow object. This filter only supports filtering by + * the flow object's ID, such as {@code ibt_123} for an InboundTransfer. + */ + @SerializedName("adjusted_flow") + String adjustedFlow; + + /** + * Filter for Adjustments by their creation time using {@code gt}, {@code gte}, {@code lt}, or + * {@code lte}. + */ + @SerializedName("created") + Created created; + + /** + * 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; + + /** The page limit. */ + @SerializedName("limit") + Long limit; + + private AdjustmentListParams( + String adjustedFlow, Created created, Map extraParams, Long limit) { + this.adjustedFlow = adjustedFlow; + this.created = created; + this.extraParams = extraParams; + this.limit = limit; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String adjustedFlow; + + private Created created; + + private Map extraParams; + + private Long limit; + + /** Finalize and obtain parameter instance from this builder. */ + public AdjustmentListParams build() { + return new AdjustmentListParams( + this.adjustedFlow, this.created, this.extraParams, this.limit); + } + + /** + * Filter for Adjustments linked to a specific flow object. This filter only supports filtering + * by the flow object's ID, such as {@code ibt_123} for an InboundTransfer. + */ + public Builder setAdjustedFlow(String adjustedFlow) { + this.adjustedFlow = adjustedFlow; + return this; + } + + /** + * Filter for Adjustments by their creation time using {@code gt}, {@code gte}, {@code lt}, or + * {@code lte}. + */ + public Builder setCreated(AdjustmentListParams.Created created) { + this.created = created; + 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 + * AdjustmentListParams#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 AdjustmentListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The page limit. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * 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; + + /** + * Filter for Adjustments created after the specified timestamp. The timestamp must be in RFC + * 3339 format, for example {@code 2022-09-18T13:22:00Z}. + */ + @SerializedName("gt") + Instant gt; + + /** + * Filter for Adjustments created on or after the specified timestamp. The timestamp must be in + * RFC 3339 format, for example {@code 2022-09-18T13:22:00Z}. + */ + @SerializedName("gte") + Instant gte; + + /** + * Filter for Adjustments created before the specified timestamp. The timestamp must be in RFC + * 3339 format, for example {@code 2022-09-18T13:22:00Z}. + */ + @SerializedName("lt") + Instant lt; + + /** + * Filter for Adjustments created on or before the specified timestamp. The timestamp must be in + * RFC 3339 format, for example {@code 2022-09-18T13:22:00Z}. + */ + @SerializedName("lte") + Instant lte; + + private Created( + Map extraParams, Instant gt, Instant gte, Instant lt, Instant lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Instant gt; + + private Instant gte; + + private Instant lt; + + private Instant lte; + + /** Finalize and obtain parameter instance from this builder. */ + public AdjustmentListParams.Created build() { + return new AdjustmentListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * 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 + * AdjustmentListParams.Created#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 AdjustmentListParams.Created#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Filter for Adjustments created after the specified timestamp. The timestamp must be in RFC + * 3339 format, for example {@code 2022-09-18T13:22:00Z}. + */ + public Builder setGt(Instant gt) { + this.gt = gt; + return this; + } + + /** + * Filter for Adjustments created on or after the specified timestamp. The timestamp must be + * in RFC 3339 format, for example {@code 2022-09-18T13:22:00Z}. + */ + public Builder setGte(Instant gte) { + this.gte = gte; + return this; + } + + /** + * Filter for Adjustments created before the specified timestamp. The timestamp must be in RFC + * 3339 format, for example {@code 2022-09-18T13:22:00Z}. + */ + public Builder setLt(Instant lt) { + this.lt = lt; + return this; + } + + /** + * Filter for Adjustments created on or before the specified timestamp. The timestamp must be + * in RFC 3339 format, for example {@code 2022-09-18T13:22:00Z}. + */ + public Builder setLte(Instant lte) { + this.lte = lte; + return this; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAccountListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAccountListParams.java new file mode 100644 index 000000000000..cf68bf9b638a --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAccountListParams.java @@ -0,0 +1,184 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class FinancialAccountListParams extends ApiRequestParams { + /** + * 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; + + /** Additional fields to include in the response. */ + @SerializedName("include") + List include; + + /** The page limit. */ + @SerializedName("limit") + Long limit; + + /** + * Return FinancialAccounts whose {@code status} matches any of the provided values. If omitted, + * closed FinancialAccounts are not returned. + */ + @SerializedName("statuses") + List statuses; + + private FinancialAccountListParams( + Map extraParams, + List include, + Long limit, + List statuses) { + this.extraParams = extraParams; + this.include = include; + this.limit = limit; + this.statuses = statuses; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List include; + + private Long limit; + + private List statuses; + + /** Finalize and obtain parameter instance from this builder. */ + public FinancialAccountListParams build() { + return new FinancialAccountListParams( + this.extraParams, this.include, this.limit, this.statuses); + } + + /** + * 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 + * FinancialAccountListParams#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 FinancialAccountListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * FinancialAccountListParams#include} for the field documentation. + */ + public Builder addInclude(FinancialAccountListParams.Include element) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.add(element); + return this; + } + + /** + * Add all elements to `include` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * FinancialAccountListParams#include} for the field documentation. + */ + public Builder addAllInclude(List elements) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.addAll(elements); + return this; + } + + /** The page limit. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Add an element to `statuses` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * FinancialAccountListParams#statuses} for the field documentation. + */ + public Builder addStatus(FinancialAccountListParams.Status element) { + if (this.statuses == null) { + this.statuses = new ArrayList<>(); + } + this.statuses.add(element); + return this; + } + + /** + * Add all elements to `statuses` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * FinancialAccountListParams#statuses} for the field documentation. + */ + public Builder addAllStatus(List elements) { + if (this.statuses == null) { + this.statuses = new ArrayList<>(); + } + this.statuses.addAll(elements); + return this; + } + } + + public enum Include implements ApiRequestParams.EnumParam { + @SerializedName("storage.deposit_insurance_eligibility") + STORAGE__DEPOSIT_INSURANCE_ELIGIBILITY("storage.deposit_insurance_eligibility"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Include(String value) { + this.value = value; + } + } + + public enum Status implements ApiRequestParams.EnumParam { + @SerializedName("closed") + CLOSED("closed"), + + @SerializedName("open") + OPEN("open"), + + @SerializedName("pending") + PENDING("pending"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Status(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAccountRetrieveParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAccountRetrieveParams.java new file mode 100644 index 000000000000..e47755dc6c0f --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAccountRetrieveParams.java @@ -0,0 +1,113 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class FinancialAccountRetrieveParams extends ApiRequestParams { + /** + * 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; + + /** Additional fields to include in the response. */ + @SerializedName("include") + List include; + + private FinancialAccountRetrieveParams( + Map extraParams, List include) { + this.extraParams = extraParams; + this.include = include; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List include; + + /** Finalize and obtain parameter instance from this builder. */ + public FinancialAccountRetrieveParams build() { + return new FinancialAccountRetrieveParams(this.extraParams, this.include); + } + + /** + * 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 + * FinancialAccountRetrieveParams#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 FinancialAccountRetrieveParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * FinancialAccountRetrieveParams#include} for the field documentation. + */ + public Builder addInclude(FinancialAccountRetrieveParams.Include element) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.add(element); + return this; + } + + /** + * Add all elements to `include` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * FinancialAccountRetrieveParams#include} for the field documentation. + */ + public Builder addAllInclude(List elements) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.addAll(elements); + return this; + } + } + + public enum Include implements ApiRequestParams.EnumParam { + @SerializedName("storage.deposit_insurance_eligibility") + STORAGE__DEPOSIT_INSURANCE_ELIGIBILITY("storage.deposit_insurance_eligibility"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Include(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAccountUpdateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAccountUpdateParams.java new file mode 100644 index 000000000000..d934f8fd988d --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAccountUpdateParams.java @@ -0,0 +1,149 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class FinancialAccountUpdateParams extends ApiRequestParams { + /** + * A descriptive name for the FinancialAccount, up to 50 characters long. This name appears in the + * Stripe Dashboard and embedded components. + */ + @SerializedName("display_name") + Object displayName; + + /** + * 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; + + /** + * Set of key-value pairs that you can attach to the FinancialAccount. Individual keys can be + * unset by posting null to them. + */ + @SerializedName("metadata") + Map metadata; + + private FinancialAccountUpdateParams( + Object displayName, Map extraParams, Map metadata) { + this.displayName = displayName; + this.extraParams = extraParams; + this.metadata = metadata; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object displayName; + + private Map extraParams; + + private Map metadata; + + /** Finalize and obtain parameter instance from this builder. */ + public FinancialAccountUpdateParams build() { + return new FinancialAccountUpdateParams(this.displayName, this.extraParams, this.metadata); + } + + /** + * A descriptive name for the FinancialAccount, up to 50 characters long. This name appears in + * the Stripe Dashboard and embedded components. + */ + public Builder setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A descriptive name for the FinancialAccount, up to 50 characters long. This name appears in + * the Stripe Dashboard and embedded components. + */ + public Builder setDisplayName(EmptyParam displayName) { + this.displayName = displayName; + 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 + * FinancialAccountUpdateParams#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 FinancialAccountUpdateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add a key/value pair to `metadata` 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 + * FinancialAccountUpdateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add a key/value pair to `metadata` 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 + * FinancialAccountUpdateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, EmptyParam value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * Map values can only be one of the following types: `String`, `EmptyParam`. See {@link + * FinancialAccountUpdateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (!map.values().stream().allMatch(v -> v instanceof String || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: String, EmptyParam"); + } + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressCreateParams.java new file mode 100644 index 000000000000..605223cc4a01 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressCreateParams.java @@ -0,0 +1,243 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class FinancialAddressCreateParams extends ApiRequestParams { + /** Properties for creating a bank account FinancialAddress. */ + @SerializedName("bank_account") + BankAccount bankAccount; + + /** + * 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. The ID of the FinancialAccount the new FinancialAddress should be + * associated with. + */ + @SerializedName("financial_account") + String financialAccount; + + /** + * Required. The type of FinancialAddress to create. Must agree with which branch + * of financial_address_type_properties is set. + */ + @SerializedName("type") + Type type; + + private FinancialAddressCreateParams( + BankAccount bankAccount, + Map extraParams, + String financialAccount, + Type type) { + this.bankAccount = bankAccount; + this.extraParams = extraParams; + this.financialAccount = financialAccount; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankAccount bankAccount; + + private Map extraParams; + + private String financialAccount; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public FinancialAddressCreateParams build() { + return new FinancialAddressCreateParams( + this.bankAccount, this.extraParams, this.financialAccount, this.type); + } + + /** Properties for creating a bank account FinancialAddress. */ + public Builder setBankAccount(FinancialAddressCreateParams.BankAccount bankAccount) { + this.bankAccount = bankAccount; + 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 + * FinancialAddressCreateParams#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 FinancialAddressCreateParams#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. The ID of the FinancialAccount the new FinancialAddress should be + * associated with. + */ + public Builder setFinancialAccount(String financialAccount) { + this.financialAccount = financialAccount; + return this; + } + + /** + * Required. The type of FinancialAddress to create. Must agree with which + * branch of financial_address_type_properties is set. + */ + public Builder setType(FinancialAddressCreateParams.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankAccount { + /** The country for the bank account. Used to select the appropriate rails (e.g. for SEPA). */ + @SerializedName("country") + String country; + + /** + * Required. The currency of the bank account to provision. Available + * currencies depend on your account's enabled features and rollout access; {@code eur} requires + * the Financial Address Global Payouts EU preview. + */ + @SerializedName("currency") + Currency 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; + + private BankAccount(String country, Currency currency, Map extraParams) { + this.country = country; + this.currency = currency; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String country; + + private Currency currency; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public FinancialAddressCreateParams.BankAccount build() { + return new FinancialAddressCreateParams.BankAccount( + this.country, this.currency, this.extraParams); + } + + /** The country for the bank account. Used to select the appropriate rails (e.g. for SEPA). */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Required. The currency of the bank account to provision. Available + * currencies depend on your account's enabled features and rollout access; {@code eur} + * requires the Financial Address Global Payouts EU preview. + */ + public Builder setCurrency(FinancialAddressCreateParams.BankAccount.Currency 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 + * FinancialAddressCreateParams.BankAccount#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 FinancialAddressCreateParams.BankAccount#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Currency implements ApiRequestParams.EnumParam { + @SerializedName("eur") + EUR("eur"), + + @SerializedName("gbp") + GBP("gbp"), + + @SerializedName("usd") + USD("usd"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Currency(String value) { + this.value = value; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bank_account") + BANK_ACCOUNT("bank_account"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressListParams.java new file mode 100644 index 000000000000..71dd6550bde3 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressListParams.java @@ -0,0 +1,92 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class FinancialAddressListParams extends ApiRequestParams { + /** + * 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; + + /** The ID of the FinancialAccount for which FinancialAddresses are to be returned. */ + @SerializedName("financial_account") + String financialAccount; + + /** The page limit. */ + @SerializedName("limit") + Long limit; + + private FinancialAddressListParams( + Map extraParams, String financialAccount, Long limit) { + this.extraParams = extraParams; + this.financialAccount = financialAccount; + this.limit = limit; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String financialAccount; + + private Long limit; + + /** Finalize and obtain parameter instance from this builder. */ + public FinancialAddressListParams build() { + return new FinancialAddressListParams(this.extraParams, this.financialAccount, this.limit); + } + + /** + * 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 + * FinancialAddressListParams#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 FinancialAddressListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The ID of the FinancialAccount for which FinancialAddresses are to be returned. */ + public Builder setFinancialAccount(String financialAccount) { + this.financialAccount = financialAccount; + return this; + } + + /** The page limit. */ + public Builder setLimit(Long limit) { + this.limit = limit; + 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 new file mode 100644 index 000000000000..d860fba686ca --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferCreateParams.java @@ -0,0 +1,310 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +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; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class InboundTransferCreateParams extends ApiRequestParams { + /** Required. The amount and currency to credit to the FinancialAccount. */ + @SerializedName("amount") + Amount amount; + + /** An optional, freeform description field intended to store metadata. */ + @SerializedName("description") + String description; + + /** + * 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. The verified bank account credential to debit for this + * InboundTransfer. + */ + @SerializedName("from") + From from; + + /** + * Required. The FinancialAccount and currency to credit with the transferred + * funds. + */ + @SerializedName("to") + To to; + + private InboundTransferCreateParams( + Amount amount, String description, Map extraParams, From from, To to) { + this.amount = amount; + this.description = description; + this.extraParams = extraParams; + this.from = from; + this.to = to; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private String description; + + private Map extraParams; + + private From from; + + private To to; + + /** Finalize and obtain parameter instance from this builder. */ + public InboundTransferCreateParams build() { + return new InboundTransferCreateParams( + this.amount, this.description, this.extraParams, this.from, this.to); + } + + /** Required. The amount and currency to credit to the FinancialAccount. */ + public Builder setAmount(Amount amount) { + this.amount = amount; + return this; + } + + /** An optional, freeform description field intended to store metadata. */ + public Builder setDescription(String description) { + this.description = description; + 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#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#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. The verified bank account credential to debit for this + * InboundTransfer. + */ + public Builder setFrom(InboundTransferCreateParams.From from) { + this.from = from; + return this; + } + + /** + * Required. The FinancialAccount and currency to credit with the transferred + * funds. + */ + public Builder setTo(InboundTransferCreateParams.To to) { + this.to = to; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class From { + /** + * An optional currency field used to specify which currency is debited from the Payment Method. + * Since many Payment Methods support only one currency, this field is optional. + */ + @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. ID of the verified bank account credential to debit for this + * InboundTransfer (for example, {@code usba_}), not a Payments API {@code pm_} PaymentMethod. + */ + @SerializedName("payment_method") + String paymentMethod; + + private From(String currency, Map extraParams, String paymentMethod) { + this.currency = currency; + this.extraParams = extraParams; + this.paymentMethod = paymentMethod; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private String paymentMethod; + + /** Finalize and obtain parameter instance from this builder. */ + public InboundTransferCreateParams.From build() { + return new InboundTransferCreateParams.From( + this.currency, this.extraParams, this.paymentMethod); + } + + /** + * An optional currency field used to specify which currency is debited from the Payment + * Method. Since many Payment Methods support only one currency, this field is optional. + */ + 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.From#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.From#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. ID of the verified bank account credential to debit for this + * InboundTransfer (for example, {@code usba_}), not a Payments API {@code pm_} PaymentMethod. + */ + public Builder setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class To { + /** Required. The currency to credit to the FinancialAccount. */ + @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. The FinancialAccount that receives the funds. */ + @SerializedName("financial_account") + String financialAccount; + + private To(String currency, Map extraParams, String financialAccount) { + this.currency = currency; + this.extraParams = extraParams; + this.financialAccount = financialAccount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private String financialAccount; + + /** Finalize and obtain parameter instance from this builder. */ + public InboundTransferCreateParams.To build() { + return new InboundTransferCreateParams.To( + this.currency, this.extraParams, this.financialAccount); + } + + /** Required. The currency to credit to the FinancialAccount. */ + 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.To#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.To#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. The FinancialAccount that receives the funds. */ + public Builder setFinancialAccount(String financialAccount) { + this.financialAccount = financialAccount; + return this; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferListParams.java new file mode 100644 index 000000000000..5e91bc6824ed --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/InboundTransferListParams.java @@ -0,0 +1,226 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class InboundTransferListParams extends ApiRequestParams { + /** Hash of options for filtering on creation time. */ + @SerializedName("created") + Created created; + + /** + * 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; + + /** The page limit. */ + @SerializedName("limit") + Long limit; + + private InboundTransferListParams(Created created, Map extraParams, Long limit) { + this.created = created; + this.extraParams = extraParams; + this.limit = limit; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Created created; + + private Map extraParams; + + private Long limit; + + /** Finalize and obtain parameter instance from this builder. */ + public InboundTransferListParams build() { + return new InboundTransferListParams(this.created, this.extraParams, this.limit); + } + + /** Hash of options for filtering on creation time. */ + public Builder setCreated(InboundTransferListParams.Created created) { + this.created = created; + 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 + * InboundTransferListParams#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 InboundTransferListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The page limit. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * 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; + + /** + * Filter for objects created after the specified timestamp. Must be an RFC 3339 date & time + * value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("gt") + Instant gt; + + /** + * Filter for objects created on or after the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("gte") + Instant gte; + + /** + * Filter for objects created before the specified timestamp. Must be an RFC 3339 date & + * time value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("lt") + Instant lt; + + /** + * Filter for objects created on or before the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("lte") + Instant lte; + + private Created( + Map extraParams, Instant gt, Instant gte, Instant lt, Instant lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Instant gt; + + private Instant gte; + + private Instant lt; + + private Instant lte; + + /** Finalize and obtain parameter instance from this builder. */ + public InboundTransferListParams.Created build() { + return new InboundTransferListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * 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 + * InboundTransferListParams.Created#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 InboundTransferListParams.Created#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Filter for objects created after the specified timestamp. Must be an RFC 3339 date & + * time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setGt(Instant gt) { + this.gt = gt; + return this; + } + + /** + * Filter for objects created on or after the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setGte(Instant gte) { + this.gte = gte; + return this; + } + + /** + * Filter for objects created before the specified timestamp. Must be an RFC 3339 date & + * time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setLt(Instant lt) { + this.lt = lt; + return this; + } + + /** + * Filter for objects created on or before the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setLte(Instant lte) { + this.lte = lte; + return this; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java new file mode 100644 index 000000000000..015a74d0a69b --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java @@ -0,0 +1,974 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +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; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class OutboundPaymentCreateParams extends ApiRequestParams { + /** Required. The requested amount and currency for the OutboundPayment. */ + @SerializedName("amount") + Amount amount; + + /** An arbitrary string attached to the OutboundPayment. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** + * 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. From which FinancialAccount and BalanceType to pull funds from. */ + @SerializedName("from") + From from; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** Details about the notification settings for the OutboundPayment recipient. */ + @SerializedName("recipient_notification") + RecipientNotification recipientNotification; + + /** + * The ID of the RecipientVerification for this OutboundPayment. Required where recipient-name + * verification is mandated before creating an OutboundPayment. + */ + @SerializedName("recipient_verification") + String recipientVerification; + + /** + * The description that appears on the receiving end for an OutboundPayment (for example, on a + * bank statement). Must be between 3 and 22 characters long for most destinations (500 for + * FinancialAccount destinations), and not contain profanity. + */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + /** Required. To which payout method to send the OutboundPayment. */ + @SerializedName("to") + To to; + + private OutboundPaymentCreateParams( + Amount amount, + String description, + Map extraParams, + From from, + Map metadata, + RecipientNotification recipientNotification, + String recipientVerification, + String statementDescriptor, + To to) { + this.amount = amount; + this.description = description; + this.extraParams = extraParams; + this.from = from; + this.metadata = metadata; + this.recipientNotification = recipientNotification; + this.recipientVerification = recipientVerification; + this.statementDescriptor = statementDescriptor; + this.to = to; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private String description; + + private Map extraParams; + + private From from; + + private Map metadata; + + private RecipientNotification recipientNotification; + + private String recipientVerification; + + private String statementDescriptor; + + private To to; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundPaymentCreateParams build() { + return new OutboundPaymentCreateParams( + this.amount, + this.description, + this.extraParams, + this.from, + this.metadata, + this.recipientNotification, + this.recipientVerification, + this.statementDescriptor, + this.to); + } + + /** Required. The requested amount and currency for the OutboundPayment. */ + public Builder setAmount(Amount amount) { + this.amount = amount; + return this; + } + + /** + * An arbitrary string attached to the OutboundPayment. Often useful for displaying to users. + */ + public Builder setDescription(String description) { + this.description = description; + 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#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#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. From which FinancialAccount and BalanceType to pull funds from. + */ + public Builder setFrom(OutboundPaymentCreateParams.From from) { + this.from = from; + return this; + } + + /** + * Add a key/value pair to `metadata` 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#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` 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#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** Details about the notification settings for the OutboundPayment recipient. */ + public Builder setRecipientNotification( + OutboundPaymentCreateParams.RecipientNotification recipientNotification) { + this.recipientNotification = recipientNotification; + return this; + } + + /** + * The ID of the RecipientVerification for this OutboundPayment. Required where recipient-name + * verification is mandated before creating an OutboundPayment. + */ + public Builder setRecipientVerification(String recipientVerification) { + this.recipientVerification = recipientVerification; + return this; + } + + /** + * The description that appears on the receiving end for an OutboundPayment (for example, on a + * bank statement). Must be between 3 and 22 characters long for most destinations (500 for + * FinancialAccount destinations), and not contain profanity. + */ + public Builder setStatementDescriptor(String statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + + /** Required. To which payout method to send the OutboundPayment. */ + public Builder setTo(OutboundPaymentCreateParams.To to) { + this.to = to; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class From { + /** Required. Describes the FinancialAmount's currency drawn from. */ + @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. The FinancialAccount that funds were pulled from. */ + @SerializedName("financial_account") + String financialAccount; + + private From(String currency, Map extraParams, String financialAccount) { + this.currency = currency; + this.extraParams = extraParams; + this.financialAccount = financialAccount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private String financialAccount; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundPaymentCreateParams.From build() { + return new OutboundPaymentCreateParams.From( + this.currency, this.extraParams, this.financialAccount); + } + + /** Required. Describes the FinancialAmount's currency drawn from. */ + 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.From#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.From#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. The FinancialAccount that funds were pulled from. */ + public Builder setFinancialAccount(String financialAccount) { + this.financialAccount = financialAccount; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RecipientNotification { + /** + * 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. Closed Enum. Configuration option to enable or disable + * notifications to recipients. Do not send notifications when {@code setting} is {@code none}. + * Use the account setting when {@code setting} is {@code configured} or omitted. + */ + @SerializedName("setting") + Setting setting; + + private RecipientNotification(Map extraParams, Setting setting) { + this.extraParams = extraParams; + this.setting = setting; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Setting setting; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundPaymentCreateParams.RecipientNotification build() { + return new OutboundPaymentCreateParams.RecipientNotification( + this.extraParams, this.setting); + } + + /** + * 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.RecipientNotification#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.RecipientNotification#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. Closed Enum. Configuration option to enable or disable + * notifications to recipients. Do not send notifications when {@code setting} is {@code + * none}. Use the account setting when {@code setting} is {@code configured} or omitted. + */ + public Builder setSetting(OutboundPaymentCreateParams.RecipientNotification.Setting setting) { + this.setting = setting; + return this; + } + } + + public enum Setting implements ApiRequestParams.EnumParam { + @SerializedName("configured") + CONFIGURED("configured"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Setting(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class To { + /** + * Describes the currency to send to the recipient. If included, this currency must match a + * currency supported by the destination. Can be omitted in the following cases: - destination + * only supports one currency - destination supports multiple currencies and one matches {@code + * from.currency} - destination supports multiple currencies and one matches {@code + * amount.currency} When both {@code from.currency} and {@code amount.currency} are supported, + * Stripe selects {@code from.currency} to minimize currency conversion. + */ + @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; + + /** The payout method which the OutboundPayment uses to send payout. */ + @SerializedName("payout_method") + String payoutMethod; + + /** Payout method options for the OutboundPayment. */ + @SerializedName("payout_method_options") + PayoutMethodOptions payoutMethodOptions; + + /** Required. To which account the OutboundPayment is sent. */ + @SerializedName("recipient") + String recipient; + + private To( + String currency, + Map extraParams, + String payoutMethod, + PayoutMethodOptions payoutMethodOptions, + String recipient) { + this.currency = currency; + this.extraParams = extraParams; + this.payoutMethod = payoutMethod; + this.payoutMethodOptions = payoutMethodOptions; + this.recipient = recipient; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private String payoutMethod; + + private PayoutMethodOptions payoutMethodOptions; + + private String recipient; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundPaymentCreateParams.To build() { + return new OutboundPaymentCreateParams.To( + this.currency, + this.extraParams, + this.payoutMethod, + this.payoutMethodOptions, + this.recipient); + } + + /** + * Describes the currency to send to the recipient. If included, this currency must match a + * currency supported by the destination. Can be omitted in the following cases: - destination + * only supports one currency - destination supports multiple currencies and one matches + * {@code from.currency} - destination supports multiple currencies and one matches {@code + * amount.currency} When both {@code from.currency} and {@code amount.currency} are supported, + * Stripe selects {@code from.currency} to minimize currency conversion. + */ + 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.To#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.To#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The payout method which the OutboundPayment uses to send payout. */ + public Builder setPayoutMethod(String payoutMethod) { + this.payoutMethod = payoutMethod; + return this; + } + + /** Payout method options for the OutboundPayment. */ + public Builder setPayoutMethodOptions( + OutboundPaymentCreateParams.To.PayoutMethodOptions payoutMethodOptions) { + this.payoutMethodOptions = payoutMethodOptions; + return this; + } + + /** Required. To which account the OutboundPayment is sent. */ + public Builder setRecipient(String recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PayoutMethodOptions { + /** Options for bank account payout methods. */ + @SerializedName("bank_account") + BankAccount bankAccount; + + /** + * 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; + + private PayoutMethodOptions(BankAccount bankAccount, Map extraParams) { + this.bankAccount = bankAccount; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankAccount bankAccount; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundPaymentCreateParams.To.PayoutMethodOptions build() { + return new OutboundPaymentCreateParams.To.PayoutMethodOptions( + this.bankAccount, this.extraParams); + } + + /** Options for bank account payout methods. */ + public Builder setBankAccount( + OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount bankAccount) { + this.bankAccount = bankAccount; + 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.To.PayoutMethodOptions#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.To.PayoutMethodOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankAccount { + /** + * 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; + + /** Per-network configuration options. */ + @SerializedName("preferred_network_options") + PreferredNetworkOptions preferredNetworkOptions; + + /** The preferred networks to use for this OutboundPayment. */ + @SerializedName("preferred_networks") + List + preferredNetworks; + + private BankAccount( + Map extraParams, + PreferredNetworkOptions preferredNetworkOptions, + List + preferredNetworks) { + this.extraParams = extraParams; + this.preferredNetworkOptions = preferredNetworkOptions; + this.preferredNetworks = preferredNetworks; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PreferredNetworkOptions preferredNetworkOptions; + + private List< + OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount.PreferredNetwork> + preferredNetworks; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount build() { + return new OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount( + this.extraParams, this.preferredNetworkOptions, this.preferredNetworks); + } + + /** + * 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.To.PayoutMethodOptions.BankAccount#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.To.PayoutMethodOptions.BankAccount#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Per-network configuration options. */ + public Builder setPreferredNetworkOptions( + OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions + preferredNetworkOptions) { + this.preferredNetworkOptions = preferredNetworkOptions; + return this; + } + + /** + * Add an element to `preferredNetworks` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount#preferredNetworks} for + * the field documentation. + */ + public Builder addPreferredNetwork( + OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount.PreferredNetwork + element) { + if (this.preferredNetworks == null) { + this.preferredNetworks = new ArrayList<>(); + } + this.preferredNetworks.add(element); + return this; + } + + /** + * Add all elements to `preferredNetworks` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount#preferredNetworks} for + * the field documentation. + */ + public Builder addAllPreferredNetwork( + List + elements) { + if (this.preferredNetworks == null) { + this.preferredNetworks = new ArrayList<>(); + } + this.preferredNetworks.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PreferredNetworkOptions { + /** ACH-specific network options. */ + @SerializedName("ach") + Ach ach; + + /** + * 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; + + private PreferredNetworkOptions(Ach ach, Map extraParams) { + this.ach = ach; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Ach ach; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions + build() { + return new OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions(this.ach, this.extraParams); + } + + /** ACH-specific network options. */ + public Builder setAch( + OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach + ach) { + this.ach = ach; + 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.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions#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.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Ach { + /** + * 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; + + /** Open Enum. ACH submission timing. */ + @SerializedName("submission") + Submission submission; + + /** The transaction purpose for this ACH payment. */ + @SerializedName("transaction_purpose") + TransactionPurpose transactionPurpose; + + private Ach( + Map extraParams, + Submission submission, + TransactionPurpose transactionPurpose) { + this.extraParams = extraParams; + this.submission = submission; + this.transactionPurpose = transactionPurpose; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Submission submission; + + private TransactionPurpose transactionPurpose; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach + build() { + return new OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach( + this.extraParams, this.submission, this.transactionPurpose); + } + + /** + * 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.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions.Ach#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.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions.Ach#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Open Enum. ACH submission timing. */ + public Builder setSubmission( + OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach.Submission + submission) { + this.submission = submission; + return this; + } + + /** The transaction purpose for this ACH payment. */ + public Builder setTransactionPurpose( + OutboundPaymentCreateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach.TransactionPurpose + transactionPurpose) { + this.transactionPurpose = transactionPurpose; + return this; + } + } + + public enum Submission implements ApiRequestParams.EnumParam { + @SerializedName("next_day") + NEXT_DAY("next_day"), + + @SerializedName("same_day") + SAME_DAY("same_day"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Submission(String value) { + this.value = value; + } + } + + public enum TransactionPurpose implements ApiRequestParams.EnumParam { + @SerializedName("payroll") + PAYROLL("payroll"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TransactionPurpose(String value) { + this.value = value; + } + } + } + } + + public enum PreferredNetwork implements ApiRequestParams.EnumParam { + @SerializedName("ach") + ACH("ach"), + + @SerializedName("fedwire") + FEDWIRE("fedwire"), + + @SerializedName("fps") + FPS("fps"), + + @SerializedName("rtp") + RTP("rtp"), + + @SerializedName("sepa") + SEPA("sepa"), + + @SerializedName("swift") + SWIFT("swift"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PreferredNetwork(String value) { + this.value = value; + } + } + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentListParams.java new file mode 100644 index 000000000000..2bd5922331b8 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentListParams.java @@ -0,0 +1,304 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.time.Instant; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class OutboundPaymentListParams extends ApiRequestParams { + /** Filter OutboundPayments by their creation time. */ + @SerializedName("created") + Created created; + + /** + * 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; + + /** The maximum number of results to return. */ + @SerializedName("limit") + Long limit; + + /** Only return OutboundPayments sent to this recipient. */ + @SerializedName("recipient") + String recipient; + + /** Closed Enum. Only return OutboundPayments with this status. */ + @SerializedName("status") + List status; + + private OutboundPaymentListParams( + Created created, + Map extraParams, + Long limit, + String recipient, + List status) { + this.created = created; + this.extraParams = extraParams; + this.limit = limit; + this.recipient = recipient; + this.status = status; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Created created; + + private Map extraParams; + + private Long limit; + + private String recipient; + + private List status; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundPaymentListParams build() { + return new OutboundPaymentListParams( + this.created, this.extraParams, this.limit, this.recipient, this.status); + } + + /** Filter OutboundPayments by their creation time. */ + public Builder setCreated(OutboundPaymentListParams.Created created) { + this.created = created; + 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 + * OutboundPaymentListParams#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 OutboundPaymentListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The maximum number of results to return. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + + /** Only return OutboundPayments sent to this recipient. */ + public Builder setRecipient(String recipient) { + this.recipient = recipient; + return this; + } + + /** + * Add an element to `status` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * OutboundPaymentListParams#status} for the field documentation. + */ + public Builder addStatus(OutboundPaymentListParams.Status element) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.add(element); + return this; + } + + /** + * Add all elements to `status` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * OutboundPaymentListParams#status} for the field documentation. + */ + public Builder addAllStatus(List elements) { + if (this.status == null) { + this.status = new ArrayList<>(); + } + this.status.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * 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; + + /** + * Filter for objects created after the specified timestamp. Must be an RFC 3339 date & time + * value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("gt") + Instant gt; + + /** + * Filter for objects created on or after the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("gte") + Instant gte; + + /** + * Filter for objects created before the specified timestamp. Must be an RFC 3339 date & + * time value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("lt") + Instant lt; + + /** + * Filter for objects created on or before the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("lte") + Instant lte; + + private Created( + Map extraParams, Instant gt, Instant gte, Instant lt, Instant lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Instant gt; + + private Instant gte; + + private Instant lt; + + private Instant lte; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundPaymentListParams.Created build() { + return new OutboundPaymentListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * 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 + * OutboundPaymentListParams.Created#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 OutboundPaymentListParams.Created#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Filter for objects created after the specified timestamp. Must be an RFC 3339 date & + * time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setGt(Instant gt) { + this.gt = gt; + return this; + } + + /** + * Filter for objects created on or after the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setGte(Instant gte) { + this.gte = gte; + return this; + } + + /** + * Filter for objects created before the specified timestamp. Must be an RFC 3339 date & + * time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setLt(Instant lt) { + this.lt = lt; + return this; + } + + /** + * Filter for objects created on or before the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setLte(Instant lte) { + this.lte = lte; + return this; + } + } + } + + public enum Status implements ApiRequestParams.EnumParam { + @SerializedName("canceled") + CANCELED("canceled"), + + @SerializedName("failed") + FAILED("failed"), + + @SerializedName("posted") + POSTED("posted"), + + @SerializedName("processing") + PROCESSING("processing"), + + @SerializedName("returned") + RETURNED("returned"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Status(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentCreateParams.java new file mode 100644 index 000000000000..a8a6a247f69e --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentCreateParams.java @@ -0,0 +1,435 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class OutboundSetupIntentCreateParams extends ApiRequestParams { + /** + * 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; + + /** + * If provided, the existing payout method resource to link to this setup intent. Any + * payout_method_data provided is used to update information on this linked payout method + * resource. + */ + @SerializedName("payout_method") + String payoutMethod; + + /** + * If no payout_method provided, used to create the underlying credential that is set up for + * outbound money movement. If a payout_method provided, used to update data on the credential + * linked to this setup intent. + */ + @SerializedName("payout_method_data") + PayoutMethodData payoutMethodData; + + /** + * Specify which type of outbound money movement this credential should be set up for (payment | + * transfer). If not provided, defaults to payment. + */ + @SerializedName("usage_intent") + UsageIntent usageIntent; + + private OutboundSetupIntentCreateParams( + Map extraParams, + String payoutMethod, + PayoutMethodData payoutMethodData, + UsageIntent usageIntent) { + this.extraParams = extraParams; + this.payoutMethod = payoutMethod; + this.payoutMethodData = payoutMethodData; + this.usageIntent = usageIntent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String payoutMethod; + + private PayoutMethodData payoutMethodData; + + private UsageIntent usageIntent; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundSetupIntentCreateParams build() { + return new OutboundSetupIntentCreateParams( + this.extraParams, this.payoutMethod, this.payoutMethodData, this.usageIntent); + } + + /** + * 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 + * OutboundSetupIntentCreateParams#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 OutboundSetupIntentCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * If provided, the existing payout method resource to link to this setup intent. Any + * payout_method_data provided is used to update information on this linked payout method + * resource. + */ + public Builder setPayoutMethod(String payoutMethod) { + this.payoutMethod = payoutMethod; + return this; + } + + /** + * If no payout_method provided, used to create the underlying credential that is set up for + * outbound money movement. If a payout_method provided, used to update data on the credential + * linked to this setup intent. + */ + public Builder setPayoutMethodData( + OutboundSetupIntentCreateParams.PayoutMethodData payoutMethodData) { + this.payoutMethodData = payoutMethodData; + return this; + } + + /** + * Specify which type of outbound money movement this credential should be set up for (payment | + * transfer). If not provided, defaults to payment. + */ + public Builder setUsageIntent(OutboundSetupIntentCreateParams.UsageIntent usageIntent) { + this.usageIntent = usageIntent; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PayoutMethodData { + /** The type specific details of the bank account payout method. */ + @SerializedName("bank_account") + BankAccount bankAccount; + + /** + * 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. Open Enum. The type of payout method to be created. */ + @SerializedName("type") + Type type; + + private PayoutMethodData(BankAccount bankAccount, Map extraParams, Type type) { + this.bankAccount = bankAccount; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankAccount bankAccount; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundSetupIntentCreateParams.PayoutMethodData build() { + return new OutboundSetupIntentCreateParams.PayoutMethodData( + this.bankAccount, this.extraParams, this.type); + } + + /** The type specific details of the bank account payout method. */ + public Builder setBankAccount( + OutboundSetupIntentCreateParams.PayoutMethodData.BankAccount bankAccount) { + this.bankAccount = bankAccount; + 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 + * OutboundSetupIntentCreateParams.PayoutMethodData#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 OutboundSetupIntentCreateParams.PayoutMethodData#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. Open Enum. The type of payout method to be created. */ + public Builder setType(OutboundSetupIntentCreateParams.PayoutMethodData.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankAccount { + /** Required. The account number or IBAN of the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Closed Enum. The type of the bank account (checking or savings). */ + @SerializedName("bank_account_type") + BankAccountType bankAccountType; + + /** The branch number of the bank account, if present. */ + @SerializedName("branch_number") + String branchNumber; + + /** Required. The country code of the bank account. */ + @SerializedName("country") + String country; + + /** Required. The currency of the bank account. */ + @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; + + /** The routing number of the bank account, if present. */ + @SerializedName("routing_number") + String routingNumber; + + /** The swift code of the bank account, if present. */ + @SerializedName("swift_code") + String swiftCode; + + private BankAccount( + String accountNumber, + BankAccountType bankAccountType, + String branchNumber, + String country, + String currency, + Map extraParams, + String routingNumber, + String swiftCode) { + this.accountNumber = accountNumber; + this.bankAccountType = bankAccountType; + this.branchNumber = branchNumber; + this.country = country; + this.currency = currency; + this.extraParams = extraParams; + this.routingNumber = routingNumber; + this.swiftCode = swiftCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private BankAccountType bankAccountType; + + private String branchNumber; + + private String country; + + private String currency; + + private Map extraParams; + + private String routingNumber; + + private String swiftCode; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundSetupIntentCreateParams.PayoutMethodData.BankAccount build() { + return new OutboundSetupIntentCreateParams.PayoutMethodData.BankAccount( + this.accountNumber, + this.bankAccountType, + this.branchNumber, + this.country, + this.currency, + this.extraParams, + this.routingNumber, + this.swiftCode); + } + + /** Required. The account number or IBAN of the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Closed Enum. The type of the bank account (checking or savings). */ + public Builder setBankAccountType( + OutboundSetupIntentCreateParams.PayoutMethodData.BankAccount.BankAccountType + bankAccountType) { + this.bankAccountType = bankAccountType; + return this; + } + + /** The branch number of the bank account, if present. */ + public Builder setBranchNumber(String branchNumber) { + this.branchNumber = branchNumber; + return this; + } + + /** Required. The country code of the bank account. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** Required. The currency of the bank account. */ + 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 OutboundSetupIntentCreateParams.PayoutMethodData.BankAccount#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 OutboundSetupIntentCreateParams.PayoutMethodData.BankAccount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The routing number of the bank account, if present. */ + public Builder setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** The swift code of the bank account, if present. */ + public Builder setSwiftCode(String swiftCode) { + this.swiftCode = swiftCode; + return this; + } + } + + public enum BankAccountType implements ApiRequestParams.EnumParam { + @SerializedName("checking") + CHECKING("checking"), + + @SerializedName("futsu") + FUTSU("futsu"), + + @SerializedName("savings") + SAVINGS("savings"), + + @SerializedName("toza") + TOZA("toza"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BankAccountType(String value) { + this.value = value; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bank_account") + BANK_ACCOUNT("bank_account"), + + @SerializedName("card") + CARD("card"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + public enum UsageIntent implements ApiRequestParams.EnumParam { + @SerializedName("payment") + PAYMENT("payment"), + + @SerializedName("transfer") + TRANSFER("transfer"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + UsageIntent(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentListParams.java new file mode 100644 index 000000000000..cb5e4e3e1377 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentListParams.java @@ -0,0 +1,78 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class OutboundSetupIntentListParams extends ApiRequestParams { + /** + * 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; + + /** The page size. */ + @SerializedName("limit") + Long limit; + + private OutboundSetupIntentListParams(Map extraParams, Long limit) { + this.extraParams = extraParams; + this.limit = limit; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long limit; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundSetupIntentListParams build() { + return new OutboundSetupIntentListParams(this.extraParams, this.limit); + } + + /** + * 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 + * OutboundSetupIntentListParams#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 OutboundSetupIntentListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The page size. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentUpdateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentUpdateParams.java new file mode 100644 index 000000000000..483beee93bb8 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentUpdateParams.java @@ -0,0 +1,435 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class OutboundSetupIntentUpdateParams extends ApiRequestParams { + /** + * 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; + + /** If provided, the existing payout method resource to link to this outbound setup intent. */ + @SerializedName("payout_method") + Object payoutMethod; + + /** + * If no payout_method provided, used to create the underlying credential that is set up for + * outbound money movement. If a payout_method provided, used to update data on the credential + * linked to this setup intent. Only card expiry (exp_month, exp_year) can be updated in the case + * where payout_method is provided. + */ + @SerializedName("payout_method_data") + PayoutMethodData payoutMethodData; + + private OutboundSetupIntentUpdateParams( + Map extraParams, Object payoutMethod, PayoutMethodData payoutMethodData) { + this.extraParams = extraParams; + this.payoutMethod = payoutMethod; + this.payoutMethodData = payoutMethodData; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object payoutMethod; + + private PayoutMethodData payoutMethodData; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundSetupIntentUpdateParams build() { + return new OutboundSetupIntentUpdateParams( + this.extraParams, this.payoutMethod, this.payoutMethodData); + } + + /** + * 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 + * OutboundSetupIntentUpdateParams#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 OutboundSetupIntentUpdateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** If provided, the existing payout method resource to link to this outbound setup intent. */ + public Builder setPayoutMethod(String payoutMethod) { + this.payoutMethod = payoutMethod; + return this; + } + + /** If provided, the existing payout method resource to link to this outbound setup intent. */ + public Builder setPayoutMethod(EmptyParam payoutMethod) { + this.payoutMethod = payoutMethod; + return this; + } + + /** + * If no payout_method provided, used to create the underlying credential that is set up for + * outbound money movement. If a payout_method provided, used to update data on the credential + * linked to this setup intent. Only card expiry (exp_month, exp_year) can be updated in the + * case where payout_method is provided. + */ + public Builder setPayoutMethodData( + OutboundSetupIntentUpdateParams.PayoutMethodData payoutMethodData) { + this.payoutMethodData = payoutMethodData; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PayoutMethodData { + /** The type specific details of the bank account payout method. */ + @SerializedName("bank_account") + BankAccount bankAccount; + + /** + * 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. Open Enum. The type of payout method to be created/updated. */ + @SerializedName("type") + Type type; + + private PayoutMethodData(BankAccount bankAccount, Map extraParams, Type type) { + this.bankAccount = bankAccount; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankAccount bankAccount; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundSetupIntentUpdateParams.PayoutMethodData build() { + return new OutboundSetupIntentUpdateParams.PayoutMethodData( + this.bankAccount, this.extraParams, this.type); + } + + /** The type specific details of the bank account payout method. */ + public Builder setBankAccount( + OutboundSetupIntentUpdateParams.PayoutMethodData.BankAccount bankAccount) { + this.bankAccount = bankAccount; + 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 + * OutboundSetupIntentUpdateParams.PayoutMethodData#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 OutboundSetupIntentUpdateParams.PayoutMethodData#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. Open Enum. The type of payout method to be created/updated. */ + public Builder setType(OutboundSetupIntentUpdateParams.PayoutMethodData.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankAccount { + /** Required. The account number or IBAN of the bank account. */ + @SerializedName("account_number") + Object accountNumber; + + /** Closed Enum. The type of the bank account (checking or savings). */ + @SerializedName("bank_account_type") + BankAccountType bankAccountType; + + /** The branch number of the bank account, if present. */ + @SerializedName("branch_number") + Object branchNumber; + + /** Required. The country code of the bank account. */ + @SerializedName("country") + Object country; + + /** Required. The currency of the bank account. */ + @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; + + /** The routing number of the bank account, if present. */ + @SerializedName("routing_number") + Object routingNumber; + + /** The swift code of the bank account, if present. */ + @SerializedName("swift_code") + Object swiftCode; + + private BankAccount( + Object accountNumber, + BankAccountType bankAccountType, + Object branchNumber, + Object country, + Object currency, + Map extraParams, + Object routingNumber, + Object swiftCode) { + this.accountNumber = accountNumber; + this.bankAccountType = bankAccountType; + this.branchNumber = branchNumber; + this.country = country; + this.currency = currency; + this.extraParams = extraParams; + this.routingNumber = routingNumber; + this.swiftCode = swiftCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object accountNumber; + + private BankAccountType bankAccountType; + + private Object branchNumber; + + private Object country; + + private Object currency; + + private Map extraParams; + + private Object routingNumber; + + private Object swiftCode; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundSetupIntentUpdateParams.PayoutMethodData.BankAccount build() { + return new OutboundSetupIntentUpdateParams.PayoutMethodData.BankAccount( + this.accountNumber, + this.bankAccountType, + this.branchNumber, + this.country, + this.currency, + this.extraParams, + this.routingNumber, + this.swiftCode); + } + + /** Required. The account number or IBAN of the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Required. The account number or IBAN of the bank account. */ + public Builder setAccountNumber(EmptyParam accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Closed Enum. The type of the bank account (checking or savings). */ + public Builder setBankAccountType( + OutboundSetupIntentUpdateParams.PayoutMethodData.BankAccount.BankAccountType + bankAccountType) { + this.bankAccountType = bankAccountType; + return this; + } + + /** The branch number of the bank account, if present. */ + public Builder setBranchNumber(String branchNumber) { + this.branchNumber = branchNumber; + return this; + } + + /** The branch number of the bank account, if present. */ + public Builder setBranchNumber(EmptyParam branchNumber) { + this.branchNumber = branchNumber; + return this; + } + + /** Required. The country code of the bank account. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** Required. The country code of the bank account. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** Required. The currency of the bank account. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Required. The currency of the bank account. */ + 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 OutboundSetupIntentUpdateParams.PayoutMethodData.BankAccount#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 OutboundSetupIntentUpdateParams.PayoutMethodData.BankAccount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The routing number of the bank account, if present. */ + public Builder setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** The routing number of the bank account, if present. */ + public Builder setRoutingNumber(EmptyParam routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** The swift code of the bank account, if present. */ + public Builder setSwiftCode(String swiftCode) { + this.swiftCode = swiftCode; + return this; + } + + /** The swift code of the bank account, if present. */ + public Builder setSwiftCode(EmptyParam swiftCode) { + this.swiftCode = swiftCode; + return this; + } + } + + public enum BankAccountType implements ApiRequestParams.EnumParam { + @SerializedName("checking") + CHECKING("checking"), + + @SerializedName("futsu") + FUTSU("futsu"), + + @SerializedName("savings") + SAVINGS("savings"), + + @SerializedName("toza") + TOZA("toza"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BankAccountType(String value) { + this.value = value; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bank_account") + BANK_ACCOUNT("bank_account"), + + @SerializedName("card") + CARD("card"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/PayoutIntentCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/PayoutIntentCreateParams.java new file mode 100644 index 000000000000..e952b7d59c27 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/PayoutIntentCreateParams.java @@ -0,0 +1,1076 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +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; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PayoutIntentCreateParams extends ApiRequestParams { + /** Required. The monetary amount to be sent. */ + @SerializedName("amount") + Amount amount; + + /** + * Controls whether the PayoutIntent requires explicit confirmation before transitioning to {@code + * pending}. Defaults to {@code automatic}, but regulatory requirements may still require + * confirmation. See Send money with + * Global Payouts for details. + */ + @SerializedName("confirmation_method") + ConfirmationMethod confirmationMethod; + + /** An arbitrary string attached to the PayoutIntent. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** + * 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. The FinancialAccount that funds are pulled from. */ + @SerializedName("from") + From from; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** + * Recipient notification settings for the PayoutIntent. Only applicable when the PayoutIntent + * creates an OutboundPayment. + */ + @SerializedName("recipient_notification") + RecipientNotification recipientNotification; + + /** + * Scheduling options for the payout. If omitted, the payout is scheduled for immediate execution. + */ + @SerializedName("schedule_options") + ScheduleOptions scheduleOptions; + + /** + * The description that appears on the receiving end for the payout (for example, on a bank + * statement). + */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + /** Required. To which payout method the payout is sent. */ + @SerializedName("to") + To to; + + private PayoutIntentCreateParams( + Amount amount, + ConfirmationMethod confirmationMethod, + String description, + Map extraParams, + From from, + Map metadata, + RecipientNotification recipientNotification, + ScheduleOptions scheduleOptions, + String statementDescriptor, + To to) { + this.amount = amount; + this.confirmationMethod = confirmationMethod; + this.description = description; + this.extraParams = extraParams; + this.from = from; + this.metadata = metadata; + this.recipientNotification = recipientNotification; + this.scheduleOptions = scheduleOptions; + this.statementDescriptor = statementDescriptor; + this.to = to; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private ConfirmationMethod confirmationMethod; + + private String description; + + private Map extraParams; + + private From from; + + private Map metadata; + + private RecipientNotification recipientNotification; + + private ScheduleOptions scheduleOptions; + + private String statementDescriptor; + + private To to; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentCreateParams build() { + return new PayoutIntentCreateParams( + this.amount, + this.confirmationMethod, + this.description, + this.extraParams, + this.from, + this.metadata, + this.recipientNotification, + this.scheduleOptions, + this.statementDescriptor, + this.to); + } + + /** Required. The monetary amount to be sent. */ + public Builder setAmount(Amount amount) { + this.amount = amount; + return this; + } + + /** + * Controls whether the PayoutIntent requires explicit confirmation before transitioning to + * {@code pending}. Defaults to {@code automatic}, but regulatory requirements may still require + * confirmation. See Send money with + * Global Payouts for details. + */ + public Builder setConfirmationMethod( + PayoutIntentCreateParams.ConfirmationMethod confirmationMethod) { + this.confirmationMethod = confirmationMethod; + return this; + } + + /** An arbitrary string attached to the PayoutIntent. Often useful for displaying to users. */ + public Builder setDescription(String description) { + this.description = description; + 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 + * PayoutIntentCreateParams#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 PayoutIntentCreateParams#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. The FinancialAccount that funds are pulled from. */ + public Builder setFrom(PayoutIntentCreateParams.From from) { + this.from = from; + return this; + } + + /** + * Add a key/value pair to `metadata` 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 + * PayoutIntentCreateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` 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 PayoutIntentCreateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * Recipient notification settings for the PayoutIntent. Only applicable when the PayoutIntent + * creates an OutboundPayment. + */ + public Builder setRecipientNotification( + PayoutIntentCreateParams.RecipientNotification recipientNotification) { + this.recipientNotification = recipientNotification; + return this; + } + + /** + * Scheduling options for the payout. If omitted, the payout is scheduled for immediate + * execution. + */ + public Builder setScheduleOptions(PayoutIntentCreateParams.ScheduleOptions scheduleOptions) { + this.scheduleOptions = scheduleOptions; + return this; + } + + /** + * The description that appears on the receiving end for the payout (for example, on a bank + * statement). + */ + public Builder setStatementDescriptor(String statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + + /** Required. To which payout method the payout is sent. */ + public Builder setTo(PayoutIntentCreateParams.To to) { + this.to = to; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class From { + /** Required. The currency of the financial account. */ + @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. The FinancialAccount that funds are pulled from. */ + @SerializedName("financial_account") + String financialAccount; + + private From(String currency, Map extraParams, String financialAccount) { + this.currency = currency; + this.extraParams = extraParams; + this.financialAccount = financialAccount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private String financialAccount; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentCreateParams.From build() { + return new PayoutIntentCreateParams.From( + this.currency, this.extraParams, this.financialAccount); + } + + /** Required. The currency of the financial account. */ + 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 + * PayoutIntentCreateParams.From#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 PayoutIntentCreateParams.From#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. The FinancialAccount that funds are pulled from. */ + public Builder setFinancialAccount(String financialAccount) { + this.financialAccount = financialAccount; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RecipientNotification { + /** + * 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. Closed Enum. Configuration option to enable or disable + * notifications to recipients. Do not send notifications when {@code setting} is {@code none}. + * Use the account setting when {@code setting} is {@code configured} or omitted. + */ + @SerializedName("setting") + Setting setting; + + private RecipientNotification(Map extraParams, Setting setting) { + this.extraParams = extraParams; + this.setting = setting; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Setting setting; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentCreateParams.RecipientNotification build() { + return new PayoutIntentCreateParams.RecipientNotification(this.extraParams, this.setting); + } + + /** + * 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 + * PayoutIntentCreateParams.RecipientNotification#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 PayoutIntentCreateParams.RecipientNotification#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. Closed Enum. Configuration option to enable or disable + * notifications to recipients. Do not send notifications when {@code setting} is {@code + * none}. Use the account setting when {@code setting} is {@code configured} or omitted. + */ + public Builder setSetting(PayoutIntentCreateParams.RecipientNotification.Setting setting) { + this.setting = setting; + return this; + } + } + + public enum Setting implements ApiRequestParams.EnumParam { + @SerializedName("configured") + CONFIGURED("configured"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Setting(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScheduleOptions { + /** The date when the payout should be executed, in YYYY-MM-DD format. */ + @SerializedName("execute_on") + String executeOn; + + /** + * 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; + + private ScheduleOptions(String executeOn, Map extraParams) { + this.executeOn = executeOn; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String executeOn; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentCreateParams.ScheduleOptions build() { + return new PayoutIntentCreateParams.ScheduleOptions(this.executeOn, this.extraParams); + } + + /** The date when the payout should be executed, in YYYY-MM-DD format. */ + public Builder setExecuteOn(String executeOn) { + this.executeOn = executeOn; + 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 + * PayoutIntentCreateParams.ScheduleOptions#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 PayoutIntentCreateParams.ScheduleOptions#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class To { + /** The currency to send to the recipient. */ + @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; + + /** + * The payout method ID for the PayoutIntent. Optional when the PayoutIntent creates an + * OutboundPayment and the recipient has a default payout method. Required when the PayoutIntent + * creates an OutboundTransfer. + */ + @SerializedName("payout_method") + String payoutMethod; + + /** Payout method options for the PayoutIntent. */ + @SerializedName("payout_method_options") + PayoutMethodOptions payoutMethodOptions; + + /** The recipient ID for the PayoutIntent. */ + @SerializedName("recipient") + String recipient; + + private To( + String currency, + Map extraParams, + String payoutMethod, + PayoutMethodOptions payoutMethodOptions, + String recipient) { + this.currency = currency; + this.extraParams = extraParams; + this.payoutMethod = payoutMethod; + this.payoutMethodOptions = payoutMethodOptions; + this.recipient = recipient; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private String payoutMethod; + + private PayoutMethodOptions payoutMethodOptions; + + private String recipient; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentCreateParams.To build() { + return new PayoutIntentCreateParams.To( + this.currency, + this.extraParams, + this.payoutMethod, + this.payoutMethodOptions, + this.recipient); + } + + /** The currency to send to the recipient. */ + 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 + * PayoutIntentCreateParams.To#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 PayoutIntentCreateParams.To#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The payout method ID for the PayoutIntent. Optional when the PayoutIntent creates an + * OutboundPayment and the recipient has a default payout method. Required when the + * PayoutIntent creates an OutboundTransfer. + */ + public Builder setPayoutMethod(String payoutMethod) { + this.payoutMethod = payoutMethod; + return this; + } + + /** Payout method options for the PayoutIntent. */ + public Builder setPayoutMethodOptions( + PayoutIntentCreateParams.To.PayoutMethodOptions payoutMethodOptions) { + this.payoutMethodOptions = payoutMethodOptions; + return this; + } + + /** The recipient ID for the PayoutIntent. */ + public Builder setRecipient(String recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PayoutMethodOptions { + /** Options for bank account payout methods. */ + @SerializedName("bank_account") + BankAccount bankAccount; + + /** + * 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; + + private PayoutMethodOptions(BankAccount bankAccount, Map extraParams) { + this.bankAccount = bankAccount; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankAccount bankAccount; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentCreateParams.To.PayoutMethodOptions build() { + return new PayoutIntentCreateParams.To.PayoutMethodOptions( + this.bankAccount, this.extraParams); + } + + /** Options for bank account payout methods. */ + public Builder setBankAccount( + PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount bankAccount) { + this.bankAccount = bankAccount; + 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 PayoutIntentCreateParams.To.PayoutMethodOptions#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 PayoutIntentCreateParams.To.PayoutMethodOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankAccount { + /** + * 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; + + /** Per-network configuration options. */ + @SerializedName("preferred_network_options") + PreferredNetworkOptions preferredNetworkOptions; + + /** The preferred networks to use for this PayoutIntent. */ + @SerializedName("preferred_networks") + List + preferredNetworks; + + private BankAccount( + Map extraParams, + PreferredNetworkOptions preferredNetworkOptions, + List + preferredNetworks) { + this.extraParams = extraParams; + this.preferredNetworkOptions = preferredNetworkOptions; + this.preferredNetworks = preferredNetworks; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PreferredNetworkOptions preferredNetworkOptions; + + private List + preferredNetworks; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount build() { + return new PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount( + this.extraParams, this.preferredNetworkOptions, this.preferredNetworks); + } + + /** + * 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 + * PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount#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 + * PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Per-network configuration options. */ + public Builder setPreferredNetworkOptions( + PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions + preferredNetworkOptions) { + this.preferredNetworkOptions = preferredNetworkOptions; + return this; + } + + /** + * Add an element to `preferredNetworks` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount#preferredNetworks} for the + * field documentation. + */ + public Builder addPreferredNetwork( + PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount.PreferredNetwork + element) { + if (this.preferredNetworks == null) { + this.preferredNetworks = new ArrayList<>(); + } + this.preferredNetworks.add(element); + return this; + } + + /** + * Add all elements to `preferredNetworks` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount#preferredNetworks} for the + * field documentation. + */ + public Builder addAllPreferredNetwork( + List + elements) { + if (this.preferredNetworks == null) { + this.preferredNetworks = new ArrayList<>(); + } + this.preferredNetworks.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PreferredNetworkOptions { + /** ACH-specific network options. */ + @SerializedName("ach") + Ach ach; + + /** + * 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; + + private PreferredNetworkOptions(Ach ach, Map extraParams) { + this.ach = ach; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Ach ach; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions + build() { + return new PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions(this.ach, this.extraParams); + } + + /** ACH-specific network options. */ + public Builder setAch( + PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions + .Ach + ach) { + this.ach = ach; + 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 + * PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions#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 + * PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Ach { + /** + * 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; + + /** Open Enum. ACH submission timing. */ + @SerializedName("submission") + Submission submission; + + /** The transaction purpose for this ACH payment. */ + @SerializedName("transaction_purpose") + TransactionPurpose transactionPurpose; + + private Ach( + Map extraParams, + Submission submission, + TransactionPurpose transactionPurpose) { + this.extraParams = extraParams; + this.submission = submission; + this.transactionPurpose = transactionPurpose; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Submission submission; + + private TransactionPurpose transactionPurpose; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach + build() { + return new PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach( + this.extraParams, this.submission, this.transactionPurpose); + } + + /** + * 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 + * PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions.Ach#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 + * PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions.Ach#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Open Enum. ACH submission timing. */ + public Builder setSubmission( + PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach.Submission + submission) { + this.submission = submission; + return this; + } + + /** The transaction purpose for this ACH payment. */ + public Builder setTransactionPurpose( + PayoutIntentCreateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach.TransactionPurpose + transactionPurpose) { + this.transactionPurpose = transactionPurpose; + return this; + } + } + + public enum Submission implements ApiRequestParams.EnumParam { + @SerializedName("next_day") + NEXT_DAY("next_day"), + + @SerializedName("same_day") + SAME_DAY("same_day"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Submission(String value) { + this.value = value; + } + } + + public enum TransactionPurpose implements ApiRequestParams.EnumParam { + @SerializedName("payroll") + PAYROLL("payroll"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TransactionPurpose(String value) { + this.value = value; + } + } + } + } + + public enum PreferredNetwork implements ApiRequestParams.EnumParam { + @SerializedName("ach") + ACH("ach"), + + @SerializedName("fedwire") + FEDWIRE("fedwire"), + + @SerializedName("fps") + FPS("fps"), + + @SerializedName("rtp") + RTP("rtp"), + + @SerializedName("sepa") + SEPA("sepa"), + + @SerializedName("swift") + SWIFT("swift"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PreferredNetwork(String value) { + this.value = value; + } + } + } + } + } + + public enum ConfirmationMethod implements ApiRequestParams.EnumParam { + @SerializedName("automatic") + AUTOMATIC("automatic"), + + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ConfirmationMethod(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/PayoutIntentListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/PayoutIntentListParams.java new file mode 100644 index 000000000000..573ea3fa2af3 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/PayoutIntentListParams.java @@ -0,0 +1,78 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PayoutIntentListParams extends ApiRequestParams { + /** + * 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; + + /** Maximum number of objects to return. Defaults to 10. Maximum is 100. */ + @SerializedName("limit") + Long limit; + + private PayoutIntentListParams(Map extraParams, Long limit) { + this.extraParams = extraParams; + this.limit = limit; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long limit; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentListParams build() { + return new PayoutIntentListParams(this.extraParams, this.limit); + } + + /** + * 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 + * PayoutIntentListParams#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 PayoutIntentListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Maximum number of objects to return. Defaults to 10. Maximum is 100. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/PayoutIntentUpdateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/PayoutIntentUpdateParams.java new file mode 100644 index 000000000000..f505e3c23e81 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/PayoutIntentUpdateParams.java @@ -0,0 +1,965 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PayoutIntentUpdateParams extends ApiRequestParams { + /** An arbitrary string attached to the PayoutIntent. Often useful for displaying to users. */ + @SerializedName("description") + Object description; + + /** + * 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; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** + * Recipient notification settings for the PayoutIntent. Only applicable when the PayoutIntent + * creates an OutboundPayment. + */ + @SerializedName("recipient_notification") + RecipientNotification recipientNotification; + + /** + * Scheduling options for the payout. If omitted, the payout is scheduled for immediate execution. + */ + @SerializedName("schedule_options") + ScheduleOptions scheduleOptions; + + /** + * The description that appears on the receiving end for the payout (for example, on a bank + * statement). + */ + @SerializedName("statement_descriptor") + Object statementDescriptor; + + /** To which payout method the payout is sent. */ + @SerializedName("to") + To to; + + private PayoutIntentUpdateParams( + Object description, + Map extraParams, + Map metadata, + RecipientNotification recipientNotification, + ScheduleOptions scheduleOptions, + Object statementDescriptor, + To to) { + this.description = description; + this.extraParams = extraParams; + this.metadata = metadata; + this.recipientNotification = recipientNotification; + this.scheduleOptions = scheduleOptions; + this.statementDescriptor = statementDescriptor; + this.to = to; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object description; + + private Map extraParams; + + private Map metadata; + + private RecipientNotification recipientNotification; + + private ScheduleOptions scheduleOptions; + + private Object statementDescriptor; + + private To to; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentUpdateParams build() { + return new PayoutIntentUpdateParams( + this.description, + this.extraParams, + this.metadata, + this.recipientNotification, + this.scheduleOptions, + this.statementDescriptor, + this.to); + } + + /** An arbitrary string attached to the PayoutIntent. Often useful for displaying to users. */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** An arbitrary string attached to the PayoutIntent. Often useful for displaying to users. */ + public Builder setDescription(EmptyParam description) { + this.description = description; + 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 + * PayoutIntentUpdateParams#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 PayoutIntentUpdateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add a key/value pair to `metadata` 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 + * PayoutIntentUpdateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` 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 PayoutIntentUpdateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * Recipient notification settings for the PayoutIntent. Only applicable when the PayoutIntent + * creates an OutboundPayment. + */ + public Builder setRecipientNotification( + PayoutIntentUpdateParams.RecipientNotification recipientNotification) { + this.recipientNotification = recipientNotification; + return this; + } + + /** + * Scheduling options for the payout. If omitted, the payout is scheduled for immediate + * execution. + */ + public Builder setScheduleOptions(PayoutIntentUpdateParams.ScheduleOptions scheduleOptions) { + this.scheduleOptions = scheduleOptions; + return this; + } + + /** + * The description that appears on the receiving end for the payout (for example, on a bank + * statement). + */ + public Builder setStatementDescriptor(String statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + + /** + * The description that appears on the receiving end for the payout (for example, on a bank + * statement). + */ + public Builder setStatementDescriptor(EmptyParam statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + + /** To which payout method the payout is sent. */ + public Builder setTo(PayoutIntentUpdateParams.To to) { + this.to = to; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RecipientNotification { + /** + * 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. Closed Enum. Configuration option to enable or disable + * notifications to recipients. Do not send notifications when {@code setting} is {@code none}. + * Use the account setting when {@code setting} is {@code configured} or omitted. + */ + @SerializedName("setting") + Setting setting; + + private RecipientNotification(Map extraParams, Setting setting) { + this.extraParams = extraParams; + this.setting = setting; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Setting setting; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentUpdateParams.RecipientNotification build() { + return new PayoutIntentUpdateParams.RecipientNotification(this.extraParams, this.setting); + } + + /** + * 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 + * PayoutIntentUpdateParams.RecipientNotification#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 PayoutIntentUpdateParams.RecipientNotification#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. Closed Enum. Configuration option to enable or disable + * notifications to recipients. Do not send notifications when {@code setting} is {@code + * none}. Use the account setting when {@code setting} is {@code configured} or omitted. + */ + public Builder setSetting(PayoutIntentUpdateParams.RecipientNotification.Setting setting) { + this.setting = setting; + return this; + } + } + + public enum Setting implements ApiRequestParams.EnumParam { + @SerializedName("configured") + CONFIGURED("configured"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Setting(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScheduleOptions { + /** The date when the payout should be executed, in YYYY-MM-DD format. */ + @SerializedName("execute_on") + Object executeOn; + + /** + * 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; + + private ScheduleOptions(Object executeOn, Map extraParams) { + this.executeOn = executeOn; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object executeOn; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentUpdateParams.ScheduleOptions build() { + return new PayoutIntentUpdateParams.ScheduleOptions(this.executeOn, this.extraParams); + } + + /** The date when the payout should be executed, in YYYY-MM-DD format. */ + public Builder setExecuteOn(String executeOn) { + this.executeOn = executeOn; + return this; + } + + /** The date when the payout should be executed, in YYYY-MM-DD format. */ + public Builder setExecuteOn(EmptyParam executeOn) { + this.executeOn = executeOn; + 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 + * PayoutIntentUpdateParams.ScheduleOptions#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 PayoutIntentUpdateParams.ScheduleOptions#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class To { + /** The currency to send to the recipient. */ + @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; + + /** + * The payout method ID for the PayoutIntent. Optional when the PayoutIntent creates an + * OutboundPayment and the recipient has a default payout method. Required when the PayoutIntent + * creates an OutboundTransfer. + */ + @SerializedName("payout_method") + Object payoutMethod; + + /** Payout method options for the PayoutIntent. */ + @SerializedName("payout_method_options") + PayoutMethodOptions payoutMethodOptions; + + /** The recipient ID for the PayoutIntent. */ + @SerializedName("recipient") + Object recipient; + + private To( + Object currency, + Map extraParams, + Object payoutMethod, + PayoutMethodOptions payoutMethodOptions, + Object recipient) { + this.currency = currency; + this.extraParams = extraParams; + this.payoutMethod = payoutMethod; + this.payoutMethodOptions = payoutMethodOptions; + this.recipient = recipient; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private Object payoutMethod; + + private PayoutMethodOptions payoutMethodOptions; + + private Object recipient; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentUpdateParams.To build() { + return new PayoutIntentUpdateParams.To( + this.currency, + this.extraParams, + this.payoutMethod, + this.payoutMethodOptions, + this.recipient); + } + + /** The currency to send to the recipient. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** The currency to send to the recipient. */ + 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 + * PayoutIntentUpdateParams.To#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 PayoutIntentUpdateParams.To#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The payout method ID for the PayoutIntent. Optional when the PayoutIntent creates an + * OutboundPayment and the recipient has a default payout method. Required when the + * PayoutIntent creates an OutboundTransfer. + */ + public Builder setPayoutMethod(String payoutMethod) { + this.payoutMethod = payoutMethod; + return this; + } + + /** + * The payout method ID for the PayoutIntent. Optional when the PayoutIntent creates an + * OutboundPayment and the recipient has a default payout method. Required when the + * PayoutIntent creates an OutboundTransfer. + */ + public Builder setPayoutMethod(EmptyParam payoutMethod) { + this.payoutMethod = payoutMethod; + return this; + } + + /** Payout method options for the PayoutIntent. */ + public Builder setPayoutMethodOptions( + PayoutIntentUpdateParams.To.PayoutMethodOptions payoutMethodOptions) { + this.payoutMethodOptions = payoutMethodOptions; + return this; + } + + /** The recipient ID for the PayoutIntent. */ + public Builder setRecipient(String recipient) { + this.recipient = recipient; + return this; + } + + /** The recipient ID for the PayoutIntent. */ + public Builder setRecipient(EmptyParam recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PayoutMethodOptions { + /** Options for bank account payout methods. */ + @SerializedName("bank_account") + BankAccount bankAccount; + + /** + * 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; + + private PayoutMethodOptions(BankAccount bankAccount, Map extraParams) { + this.bankAccount = bankAccount; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankAccount bankAccount; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentUpdateParams.To.PayoutMethodOptions build() { + return new PayoutIntentUpdateParams.To.PayoutMethodOptions( + this.bankAccount, this.extraParams); + } + + /** Options for bank account payout methods. */ + public Builder setBankAccount( + PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount bankAccount) { + this.bankAccount = bankAccount; + 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 PayoutIntentUpdateParams.To.PayoutMethodOptions#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 PayoutIntentUpdateParams.To.PayoutMethodOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankAccount { + /** + * 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; + + /** Per-network configuration options. */ + @SerializedName("preferred_network_options") + PreferredNetworkOptions preferredNetworkOptions; + + /** The preferred networks to use for this PayoutIntent. */ + @SerializedName("preferred_networks") + List + preferredNetworks; + + private BankAccount( + Map extraParams, + PreferredNetworkOptions preferredNetworkOptions, + List + preferredNetworks) { + this.extraParams = extraParams; + this.preferredNetworkOptions = preferredNetworkOptions; + this.preferredNetworks = preferredNetworks; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PreferredNetworkOptions preferredNetworkOptions; + + private List + preferredNetworks; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount build() { + return new PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount( + this.extraParams, this.preferredNetworkOptions, this.preferredNetworks); + } + + /** + * 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 + * PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount#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 + * PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Per-network configuration options. */ + public Builder setPreferredNetworkOptions( + PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions + preferredNetworkOptions) { + this.preferredNetworkOptions = preferredNetworkOptions; + return this; + } + + /** + * Add an element to `preferredNetworks` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount#preferredNetworks} for the + * field documentation. + */ + public Builder addPreferredNetwork( + PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount.PreferredNetwork + element) { + if (this.preferredNetworks == null) { + this.preferredNetworks = new ArrayList<>(); + } + this.preferredNetworks.add(element); + return this; + } + + /** + * Add all elements to `preferredNetworks` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount#preferredNetworks} for the + * field documentation. + */ + public Builder addAllPreferredNetwork( + List + elements) { + if (this.preferredNetworks == null) { + this.preferredNetworks = new ArrayList<>(); + } + this.preferredNetworks.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PreferredNetworkOptions { + /** ACH-specific network options. */ + @SerializedName("ach") + Ach ach; + + /** + * 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; + + private PreferredNetworkOptions(Ach ach, Map extraParams) { + this.ach = ach; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Ach ach; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions + build() { + return new PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions(this.ach, this.extraParams); + } + + /** ACH-specific network options. */ + public Builder setAch( + PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions + .Ach + ach) { + this.ach = ach; + 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 + * PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions#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 + * PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Ach { + /** + * 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; + + /** Open Enum. ACH submission timing. */ + @SerializedName("submission") + Submission submission; + + /** The transaction purpose for this ACH payment. */ + @SerializedName("transaction_purpose") + TransactionPurpose transactionPurpose; + + private Ach( + Map extraParams, + Submission submission, + TransactionPurpose transactionPurpose) { + this.extraParams = extraParams; + this.submission = submission; + this.transactionPurpose = transactionPurpose; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Submission submission; + + private TransactionPurpose transactionPurpose; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach + build() { + return new PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach( + this.extraParams, this.submission, this.transactionPurpose); + } + + /** + * 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 + * PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions.Ach#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 + * PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount.PreferredNetworkOptions.Ach#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Open Enum. ACH submission timing. */ + public Builder setSubmission( + PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach.Submission + submission) { + this.submission = submission; + return this; + } + + /** The transaction purpose for this ACH payment. */ + public Builder setTransactionPurpose( + PayoutIntentUpdateParams.To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach.TransactionPurpose + transactionPurpose) { + this.transactionPurpose = transactionPurpose; + return this; + } + } + + public enum Submission implements ApiRequestParams.EnumParam { + @SerializedName("next_day") + NEXT_DAY("next_day"), + + @SerializedName("same_day") + SAME_DAY("same_day"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Submission(String value) { + this.value = value; + } + } + + public enum TransactionPurpose implements ApiRequestParams.EnumParam { + @SerializedName("payroll") + PAYROLL("payroll"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TransactionPurpose(String value) { + this.value = value; + } + } + } + } + + public enum PreferredNetwork implements ApiRequestParams.EnumParam { + @SerializedName("ach") + ACH("ach"), + + @SerializedName("fedwire") + FEDWIRE("fedwire"), + + @SerializedName("fps") + FPS("fps"), + + @SerializedName("rtp") + RTP("rtp"), + + @SerializedName("sepa") + SEPA("sepa"), + + @SerializedName("swift") + SWIFT("swift"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PreferredNetwork(String value) { + this.value = value; + } + } + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/PayoutMethodListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/PayoutMethodListParams.java new file mode 100644 index 000000000000..02eb3a0fc202 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/PayoutMethodListParams.java @@ -0,0 +1,268 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PayoutMethodListParams extends ApiRequestParams { + /** + * 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; + + /** The page size. */ + @SerializedName("limit") + Long limit; + + /** Usage status filter. */ + @SerializedName("usage_status") + UsageStatus usageStatus; + + private PayoutMethodListParams( + Map extraParams, Long limit, UsageStatus usageStatus) { + this.extraParams = extraParams; + this.limit = limit; + this.usageStatus = usageStatus; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long limit; + + private UsageStatus usageStatus; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutMethodListParams build() { + return new PayoutMethodListParams(this.extraParams, this.limit, this.usageStatus); + } + + /** + * 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 + * PayoutMethodListParams#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 PayoutMethodListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The page size. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + + /** Usage status filter. */ + public Builder setUsageStatus(PayoutMethodListParams.UsageStatus usageStatus) { + this.usageStatus = usageStatus; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class UsageStatus { + /** + * 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; + + /** List of payments status to filter by. */ + @SerializedName("payments") + List payments; + + /** List of transfers status to filter by. */ + @SerializedName("transfers") + List transfers; + + private UsageStatus( + Map extraParams, + List payments, + List transfers) { + this.extraParams = extraParams; + this.payments = payments; + this.transfers = transfers; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List payments; + + private List transfers; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutMethodListParams.UsageStatus build() { + return new PayoutMethodListParams.UsageStatus( + this.extraParams, this.payments, this.transfers); + } + + /** + * 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 + * PayoutMethodListParams.UsageStatus#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 PayoutMethodListParams.UsageStatus#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `payments` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PayoutMethodListParams.UsageStatus#payments} for the field documentation. + */ + public Builder addPayment(PayoutMethodListParams.UsageStatus.Payment element) { + if (this.payments == null) { + this.payments = new ArrayList<>(); + } + this.payments.add(element); + return this; + } + + /** + * Add all elements to `payments` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PayoutMethodListParams.UsageStatus#payments} for the field documentation. + */ + public Builder addAllPayment(List elements) { + if (this.payments == null) { + this.payments = new ArrayList<>(); + } + this.payments.addAll(elements); + return this; + } + + /** + * Add an element to `transfers` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PayoutMethodListParams.UsageStatus#transfers} for the field documentation. + */ + public Builder addTransfer(PayoutMethodListParams.UsageStatus.Transfer element) { + if (this.transfers == null) { + this.transfers = new ArrayList<>(); + } + this.transfers.add(element); + return this; + } + + /** + * Add all elements to `transfers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PayoutMethodListParams.UsageStatus#transfers} for the field documentation. + */ + public Builder addAllTransfer(List elements) { + if (this.transfers == null) { + this.transfers = new ArrayList<>(); + } + this.transfers.addAll(elements); + return this; + } + } + + public enum Payment implements ApiRequestParams.EnumParam { + @SerializedName("disabled") + DISABLED("disabled"), + + @SerializedName("eligible") + ELIGIBLE("eligible"), + + @SerializedName("ineligible") + INELIGIBLE("ineligible"), + + @SerializedName("invalid") + INVALID("invalid"), + + @SerializedName("requires_action") + REQUIRES_ACTION("requires_action"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Payment(String value) { + this.value = value; + } + } + + public enum Transfer implements ApiRequestParams.EnumParam { + @SerializedName("disabled") + DISABLED("disabled"), + + @SerializedName("eligible") + ELIGIBLE("eligible"), + + @SerializedName("ineligible") + INELIGIBLE("ineligible"), + + @SerializedName("invalid") + INVALID("invalid"), + + @SerializedName("requires_action") + REQUIRES_ACTION("requires_action"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Transfer(String value) { + this.value = value; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/PayoutMethodsBankAccountSpecRetrieveParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/PayoutMethodsBankAccountSpecRetrieveParams.java new file mode 100644 index 000000000000..9464cf962f81 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/PayoutMethodsBankAccountSpecRetrieveParams.java @@ -0,0 +1,102 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PayoutMethodsBankAccountSpecRetrieveParams extends ApiRequestParams { + /** The countries to fetch the bank account spec for. */ + @SerializedName("countries") + List countries; + + /** + * 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; + + private PayoutMethodsBankAccountSpecRetrieveParams( + List countries, Map extraParams) { + this.countries = countries; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List countries; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PayoutMethodsBankAccountSpecRetrieveParams build() { + return new PayoutMethodsBankAccountSpecRetrieveParams(this.countries, this.extraParams); + } + + /** + * Add an element to `countries` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PayoutMethodsBankAccountSpecRetrieveParams#countries} for the field documentation. + */ + public Builder addCountry(String element) { + if (this.countries == null) { + this.countries = new ArrayList<>(); + } + this.countries.add(element); + return this; + } + + /** + * Add all elements to `countries` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PayoutMethodsBankAccountSpecRetrieveParams#countries} for the field documentation. + */ + public Builder addAllCountry(List elements) { + if (this.countries == null) { + this.countries = new ArrayList<>(); + } + this.countries.addAll(elements); + 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 + * PayoutMethodsBankAccountSpecRetrieveParams#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 PayoutMethodsBankAccountSpecRetrieveParams#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/ReceivedCreditListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/ReceivedCreditListParams.java new file mode 100644 index 000000000000..4096213e1a18 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/ReceivedCreditListParams.java @@ -0,0 +1,226 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class ReceivedCreditListParams extends ApiRequestParams { + /** Hash of options for filtering on creation time. */ + @SerializedName("created") + Created created; + + /** + * 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; + + /** The page limit. */ + @SerializedName("limit") + Long limit; + + private ReceivedCreditListParams(Created created, Map extraParams, Long limit) { + this.created = created; + this.extraParams = extraParams; + this.limit = limit; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Created created; + + private Map extraParams; + + private Long limit; + + /** Finalize and obtain parameter instance from this builder. */ + public ReceivedCreditListParams build() { + return new ReceivedCreditListParams(this.created, this.extraParams, this.limit); + } + + /** Hash of options for filtering on creation time. */ + public Builder setCreated(ReceivedCreditListParams.Created created) { + this.created = created; + 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 + * ReceivedCreditListParams#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 ReceivedCreditListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The page limit. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * 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; + + /** + * Filter for objects created after the specified timestamp. Must be an RFC 3339 date & time + * value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("gt") + Instant gt; + + /** + * Filter for objects created on or after the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("gte") + Instant gte; + + /** + * Filter for objects created before the specified timestamp. Must be an RFC 3339 date & + * time value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("lt") + Instant lt; + + /** + * Filter for objects created on or before the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + @SerializedName("lte") + Instant lte; + + private Created( + Map extraParams, Instant gt, Instant gte, Instant lt, Instant lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Instant gt; + + private Instant gte; + + private Instant lt; + + private Instant lte; + + /** Finalize and obtain parameter instance from this builder. */ + public ReceivedCreditListParams.Created build() { + return new ReceivedCreditListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * 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 + * ReceivedCreditListParams.Created#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 ReceivedCreditListParams.Created#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Filter for objects created after the specified timestamp. Must be an RFC 3339 date & + * time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setGt(Instant gt) { + this.gt = gt; + return this; + } + + /** + * Filter for objects created on or after the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setGte(Instant gte) { + this.gte = gte; + return this; + } + + /** + * Filter for objects created before the specified timestamp. Must be an RFC 3339 date & + * time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setLt(Instant lt) { + this.lt = lt; + return this; + } + + /** + * Filter for objects created on or before the specified timestamp. Must be an RFC 3339 date + * & time value, for example: 2022-09-18T13:22:00Z. + */ + public Builder setLte(Instant lte) { + this.lte = lte; + return this; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/RecipientVerificationCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/RecipientVerificationCreateParams.java new file mode 100644 index 000000000000..4f42d25df7fd --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/RecipientVerificationCreateParams.java @@ -0,0 +1,99 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class RecipientVerificationCreateParams extends ApiRequestParams { + /** + * 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. ID of the payout method. */ + @SerializedName("payout_method") + String payoutMethod; + + /** + * ID of the recipient account. Required if the recipient is different from the sender. Omit for + * payouts to your own account. + */ + @SerializedName("recipient") + String recipient; + + private RecipientVerificationCreateParams( + Map extraParams, String payoutMethod, String recipient) { + this.extraParams = extraParams; + this.payoutMethod = payoutMethod; + this.recipient = recipient; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String payoutMethod; + + private String recipient; + + /** Finalize and obtain parameter instance from this builder. */ + public RecipientVerificationCreateParams build() { + return new RecipientVerificationCreateParams( + this.extraParams, this.payoutMethod, this.recipient); + } + + /** + * 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 + * RecipientVerificationCreateParams#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 RecipientVerificationCreateParams#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. ID of the payout method. */ + public Builder setPayoutMethod(String payoutMethod) { + this.payoutMethod = payoutMethod; + return this; + } + + /** + * ID of the recipient account. Required if the recipient is different from the sender. Omit for + * payouts to your own account. + */ + public Builder setRecipient(String recipient) { + this.recipient = recipient; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/TransactionEntryListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/TransactionEntryListParams.java new file mode 100644 index 000000000000..24b3d303e915 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/TransactionEntryListParams.java @@ -0,0 +1,225 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class TransactionEntryListParams extends ApiRequestParams { + /** Filter for TransactionEntries created within a specified time range. */ + @SerializedName("created") + Created created; + + /** + * 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; + + /** The page limit. */ + @SerializedName("limit") + Long limit; + + /** + * Filter for TransactionEntries belonging to a specific Transaction. This filter only supports + * filtering by a Transaction ID, which appears in each TransactionEntry's {@code transaction} + * field. + */ + @SerializedName("transaction") + String transaction; + + private TransactionEntryListParams( + Created created, Map extraParams, Long limit, String transaction) { + this.created = created; + this.extraParams = extraParams; + this.limit = limit; + this.transaction = transaction; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Created created; + + private Map extraParams; + + private Long limit; + + private String transaction; + + /** Finalize and obtain parameter instance from this builder. */ + public TransactionEntryListParams build() { + return new TransactionEntryListParams( + this.created, this.extraParams, this.limit, this.transaction); + } + + /** Filter for TransactionEntries created within a specified time range. */ + public Builder setCreated(TransactionEntryListParams.Created created) { + this.created = created; + 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 + * TransactionEntryListParams#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 TransactionEntryListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The page limit. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Filter for TransactionEntries belonging to a specific Transaction. This filter only supports + * filtering by a Transaction ID, which appears in each TransactionEntry's {@code transaction} + * field. + */ + public Builder setTransaction(String transaction) { + this.transaction = transaction; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * 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; + + /** Filter for objects created after the specified timestamp. */ + @SerializedName("gt") + Instant gt; + + /** Filter for objects created at or after the specified timestamp. */ + @SerializedName("gte") + Instant gte; + + /** Filter for objects created before the specified timestamp. */ + @SerializedName("lt") + Instant lt; + + /** Filter for objects created at or before the specified timestamp. */ + @SerializedName("lte") + Instant lte; + + private Created( + Map extraParams, Instant gt, Instant gte, Instant lt, Instant lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Instant gt; + + private Instant gte; + + private Instant lt; + + private Instant lte; + + /** Finalize and obtain parameter instance from this builder. */ + public TransactionEntryListParams.Created build() { + return new TransactionEntryListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * 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 + * TransactionEntryListParams.Created#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 TransactionEntryListParams.Created#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Filter for objects created after the specified timestamp. */ + public Builder setGt(Instant gt) { + this.gt = gt; + return this; + } + + /** Filter for objects created at or after the specified timestamp. */ + public Builder setGte(Instant gte) { + this.gte = gte; + return this; + } + + /** Filter for objects created before the specified timestamp. */ + public Builder setLt(Instant lt) { + this.lt = lt; + return this; + } + + /** Filter for objects created at or before the specified timestamp. */ + public Builder setLte(Instant lte) { + this.lte = lte; + return this; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/TransactionListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/TransactionListParams.java new file mode 100644 index 000000000000..ca0fcf482876 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/TransactionListParams.java @@ -0,0 +1,248 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class TransactionListParams extends ApiRequestParams { + /** Filter for Transactions created within a specified time range. */ + @SerializedName("created") + Created created; + + /** + * 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; + + /** + * Filter for Transactions belonging to a specific FinancialAccount. This filter only supports + * filtering by the FinancialAccount's ID. + */ + @SerializedName("financial_account") + String financialAccount; + + /** + * Filter for Transactions created by a specific flow object. This filter only supports filtering + * by the flow object's ID, such as {@code ibt_123} for an InboundTransfer. A value that doesn't + * match a flow ID returns an empty list. + */ + @SerializedName("flow") + String flow; + + /** The page limit. */ + @SerializedName("limit") + Long limit; + + private TransactionListParams( + Created created, + Map extraParams, + String financialAccount, + String flow, + Long limit) { + this.created = created; + this.extraParams = extraParams; + this.financialAccount = financialAccount; + this.flow = flow; + this.limit = limit; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Created created; + + private Map extraParams; + + private String financialAccount; + + private String flow; + + private Long limit; + + /** Finalize and obtain parameter instance from this builder. */ + public TransactionListParams build() { + return new TransactionListParams( + this.created, this.extraParams, this.financialAccount, this.flow, this.limit); + } + + /** Filter for Transactions created within a specified time range. */ + public Builder setCreated(TransactionListParams.Created created) { + this.created = created; + 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 + * TransactionListParams#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 TransactionListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Filter for Transactions belonging to a specific FinancialAccount. This filter only supports + * filtering by the FinancialAccount's ID. + */ + public Builder setFinancialAccount(String financialAccount) { + this.financialAccount = financialAccount; + return this; + } + + /** + * Filter for Transactions created by a specific flow object. This filter only supports + * filtering by the flow object's ID, such as {@code ibt_123} for an InboundTransfer. A value + * that doesn't match a flow ID returns an empty list. + */ + public Builder setFlow(String flow) { + this.flow = flow; + return this; + } + + /** The page limit. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * 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; + + /** Filter for objects created after the specified timestamp. */ + @SerializedName("gt") + Instant gt; + + /** Filter for objects created at or after the specified timestamp. */ + @SerializedName("gte") + Instant gte; + + /** Filter for objects created before the specified timestamp. */ + @SerializedName("lt") + Instant lt; + + /** Filter for objects created at or before the specified timestamp. */ + @SerializedName("lte") + Instant lte; + + private Created( + Map extraParams, Instant gt, Instant gte, Instant lt, Instant lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Instant gt; + + private Instant gte; + + private Instant lt; + + private Instant lte; + + /** Finalize and obtain parameter instance from this builder. */ + public TransactionListParams.Created build() { + return new TransactionListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * 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 + * TransactionListParams.Created#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 TransactionListParams.Created#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Filter for objects created after the specified timestamp. */ + public Builder setGt(Instant gt) { + this.gt = gt; + return this; + } + + /** Filter for objects created at or after the specified timestamp. */ + public Builder setGte(Instant gte) { + this.gte = gte; + return this; + } + + /** Filter for objects created before the specified timestamp. */ + public Builder setLt(Instant lt) { + this.lt = lt; + return this; + } + + /** Filter for objects created at or before the specified timestamp. */ + public Builder setLte(Instant lte) { + this.lte = lte; + return this; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/TransactionUpdateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/TransactionUpdateParams.java new file mode 100644 index 000000000000..485aeee96a05 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/TransactionUpdateParams.java @@ -0,0 +1,149 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class TransactionUpdateParams extends ApiRequestParams { + /** + * A description of the Transaction, up to 100 characters. Pass {@code null} to clear the + * description, or omit this parameter to leave it unchanged. + */ + @SerializedName("description") + Object description; + + /** + * 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; + + /** + * Set of key-value pairs that you can attach to the Transaction. Individual keys can be unset by + * posting null to them. + */ + @SerializedName("metadata") + Map metadata; + + private TransactionUpdateParams( + Object description, Map extraParams, Map metadata) { + this.description = description; + this.extraParams = extraParams; + this.metadata = metadata; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object description; + + private Map extraParams; + + private Map metadata; + + /** Finalize and obtain parameter instance from this builder. */ + public TransactionUpdateParams build() { + return new TransactionUpdateParams(this.description, this.extraParams, this.metadata); + } + + /** + * A description of the Transaction, up to 100 characters. Pass {@code null} to clear the + * description, or omit this parameter to leave it unchanged. + */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** + * A description of the Transaction, up to 100 characters. Pass {@code null} to clear the + * description, or omit this parameter to leave it unchanged. + */ + public Builder setDescription(EmptyParam description) { + this.description = description; + 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 + * TransactionUpdateParams#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 TransactionUpdateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add a key/value pair to `metadata` 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 + * TransactionUpdateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add a key/value pair to `metadata` 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 + * TransactionUpdateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, EmptyParam value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * Map values can only be one of the following types: `String`, `EmptyParam`. See {@link + * TransactionUpdateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (!map.values().stream().allMatch(v -> v instanceof String || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: String, EmptyParam"); + } + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/testhelpers/FinancialAddressCreditParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/testhelpers/FinancialAddressCreditParams.java new file mode 100644 index 000000000000..23e223992790 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/testhelpers/FinancialAddressCreditParams.java @@ -0,0 +1,146 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement.testhelpers; + +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; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class FinancialAddressCreditParams extends ApiRequestParams { + /** Required. Object containing the amount value and currency to credit. */ + @SerializedName("amount") + Amount amount; + + /** + * 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. Open Enum. The network to use in simulating the funds flow. This + * will be the reflected in the resulting ReceivedCredit. + */ + @SerializedName("network") + Network network; + + /** + * String explaining funds flow. Use this field to populate the statement descriptor of the + * ReceivedCredit created as an eventual result of this simulation. + */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + private FinancialAddressCreditParams( + Amount amount, Map extraParams, Network network, String statementDescriptor) { + this.amount = amount; + this.extraParams = extraParams; + this.network = network; + this.statementDescriptor = statementDescriptor; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private Map extraParams; + + private Network network; + + private String statementDescriptor; + + /** Finalize and obtain parameter instance from this builder. */ + public FinancialAddressCreditParams build() { + return new FinancialAddressCreditParams( + this.amount, this.extraParams, this.network, this.statementDescriptor); + } + + /** Required. Object containing the amount value and currency to credit. */ + public Builder setAmount(Amount amount) { + this.amount = amount; + 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#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#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. Open Enum. The network to use in simulating the funds flow. This + * will be the reflected in the resulting ReceivedCredit. + */ + public Builder setNetwork(FinancialAddressCreditParams.Network network) { + this.network = network; + return this; + } + + /** + * String explaining funds flow. Use this field to populate the statement descriptor of the + * ReceivedCredit created as an eventual result of this simulation. + */ + public Builder setStatementDescriptor(String statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + } + + public enum Network implements ApiRequestParams.EnumParam { + @SerializedName("ach") + ACH("ach"), + + @SerializedName("chaps") + CHAPS("chaps"), + + @SerializedName("fedwire") + FEDWIRE("fedwire"), + + @SerializedName("fps") + FPS("fps"), + + @SerializedName("rtp") + RTP("rtp"), + + @SerializedName("sepa") + SEPA("sepa"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Network(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/testhelpers/MoneyManagementRecipientVerificationsParams.java b/src/main/java/com/stripe/param/v2/testhelpers/MoneyManagementRecipientVerificationsParams.java new file mode 100644 index 000000000000..aee81649f5ad --- /dev/null +++ b/src/main/java/com/stripe/param/v2/testhelpers/MoneyManagementRecipientVerificationsParams.java @@ -0,0 +1,148 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.testhelpers; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class MoneyManagementRecipientVerificationsParams extends ApiRequestParams { + /** + * 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. Expected match level of the RecipientVerification to be created: + * {@code match}, {@code close_match}, {@code no_match}, {@code unavailable}. For {@code + * close_match}, the simulated response appends "close_match" to the provided name in + * match_result_details.matched_name. + */ + @SerializedName("match_result") + MatchResult matchResult; + + /** Required. ID of the payout method. */ + @SerializedName("payout_method") + String payoutMethod; + + /** + * ID of the recipient account. Required if the recipient is different from the sender. Omit for + * payouts to your own account. + */ + @SerializedName("recipient") + String recipient; + + private MoneyManagementRecipientVerificationsParams( + Map extraParams, + MatchResult matchResult, + String payoutMethod, + String recipient) { + this.extraParams = extraParams; + this.matchResult = matchResult; + this.payoutMethod = payoutMethod; + this.recipient = recipient; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MatchResult matchResult; + + private String payoutMethod; + + private String recipient; + + /** Finalize and obtain parameter instance from this builder. */ + public MoneyManagementRecipientVerificationsParams build() { + return new MoneyManagementRecipientVerificationsParams( + this.extraParams, this.matchResult, this.payoutMethod, this.recipient); + } + + /** + * 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 + * MoneyManagementRecipientVerificationsParams#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 MoneyManagementRecipientVerificationsParams#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. Expected match level of the RecipientVerification to be created: + * {@code match}, {@code close_match}, {@code no_match}, {@code unavailable}. For {@code + * close_match}, the simulated response appends "close_match" to the provided name in + * match_result_details.matched_name. + */ + public Builder setMatchResult( + MoneyManagementRecipientVerificationsParams.MatchResult matchResult) { + this.matchResult = matchResult; + return this; + } + + /** Required. ID of the payout method. */ + public Builder setPayoutMethod(String payoutMethod) { + this.payoutMethod = payoutMethod; + return this; + } + + /** + * ID of the recipient account. Required if the recipient is different from the sender. Omit for + * payouts to your own account. + */ + public Builder setRecipient(String recipient) { + this.recipient = recipient; + return this; + } + } + + public enum MatchResult implements ApiRequestParams.EnumParam { + @SerializedName("close_match") + CLOSE_MATCH("close_match"), + + @SerializedName("match") + MATCH("match"), + + @SerializedName("no_match") + NO_MATCH("no_match"), + + @SerializedName("unavailable") + UNAVAILABLE("unavailable"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + MatchResult(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/service/SubscriptionService.java b/src/main/java/com/stripe/service/SubscriptionService.java index be3349da701b..db3ee21597e2 100644 --- a/src/main/java/com/stripe/service/SubscriptionService.java +++ b/src/main/java/com/stripe/service/SubscriptionService.java @@ -34,8 +34,9 @@ public SubscriptionService(StripeResponseGetter responseGetter) { * subscription. After it’s canceled, the subscription is largely immutable. You can still update * its metadata and {@code cancellation_details}. * - *

Any pending invoice items that you’ve created are still charged at the end of the period, - * unless manually deleted. If you’ve set + *

Pending invoice items are included on a final invoice if you generate one. Otherwise, they + * remain pending and can be billed on another invoice for the customer. To prevent billing, + * manually delete them. If you’ve set * the subscription to cancel at the end of the period, any pending prorations are also left in * place and collected at the end of the period. But if the subscription is set to cancel * immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both @@ -56,8 +57,9 @@ public Subscription cancel(String subscriptionExposedId, SubscriptionCancelParam * subscription. After it’s canceled, the subscription is largely immutable. You can still update * its metadata and {@code cancellation_details}. * - *

Any pending invoice items that you’ve created are still charged at the end of the period, - * unless manually deleted. If you’ve set + *

Pending invoice items are included on a final invoice if you generate one. Otherwise, they + * remain pending and can be billed on another invoice for the customer. To prevent billing, + * manually delete them. If you’ve set * the subscription to cancel at the end of the period, any pending prorations are also left in * place and collected at the end of the period. But if the subscription is set to cancel * immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both @@ -78,8 +80,9 @@ public Subscription cancel(String subscriptionExposedId, RequestOptions options) * subscription. After it’s canceled, the subscription is largely immutable. You can still update * its metadata and {@code cancellation_details}. * - *

Any pending invoice items that you’ve created are still charged at the end of the period, - * unless manually deleted. If you’ve set + *

Pending invoice items are included on a final invoice if you generate one. Otherwise, they + * remain pending and can be billed on another invoice for the customer. To prevent billing, + * manually delete them. If you’ve set * the subscription to cancel at the end of the period, any pending prorations are also left in * place and collected at the end of the period. But if the subscription is set to cancel * immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both @@ -99,8 +102,9 @@ public Subscription cancel(String subscriptionExposedId) throws StripeException * subscription. After it’s canceled, the subscription is largely immutable. You can still update * its metadata and {@code cancellation_details}. * - *

Any pending invoice items that you’ve created are still charged at the end of the period, - * unless manually deleted. If you’ve set + *

Pending invoice items are included on a final invoice if you generate one. Otherwise, they + * remain pending and can be billed on another invoice for the customer. To prevent billing, + * manually delete them. If you’ve set * the subscription to cancel at the end of the period, any pending prorations are also left in * place and collected at the end of the period. But if the subscription is set to cancel * immediately, pending prorations are removed if {@code invoice_now} and {@code prorate} are both diff --git a/src/main/java/com/stripe/service/V2Services.java b/src/main/java/com/stripe/service/V2Services.java index 26df97329225..0b5594b5f634 100644 --- a/src/main/java/com/stripe/service/V2Services.java +++ b/src/main/java/com/stripe/service/V2Services.java @@ -20,4 +20,12 @@ public com.stripe.service.v2.CommerceService commerce() { public com.stripe.service.v2.CoreService core() { return new com.stripe.service.v2.CoreService(this.getResponseGetter()); } + + public com.stripe.service.v2.MoneyManagementService moneyManagement() { + return new com.stripe.service.v2.MoneyManagementService(this.getResponseGetter()); + } + + public com.stripe.service.v2.TestHelperService testHelpers() { + return new com.stripe.service.v2.TestHelperService(this.getResponseGetter()); + } } diff --git a/src/main/java/com/stripe/service/apps/InstallService.java b/src/main/java/com/stripe/service/apps/InstallService.java index f605e28a1ae9..0ee9ec3de396 100644 --- a/src/main/java/com/stripe/service/apps/InstallService.java +++ b/src/main/java/com/stripe/service/apps/InstallService.java @@ -24,45 +24,49 @@ public InstallService(StripeResponseGetter responseGetter) { } /** - * Returns a list of app installs. An app developer or embedding platform filtering by its own app - * sees the installs across the accounts that installed it; other callers see the installs on - * their own account. The key selects the environment: a live key lists live installs, a sandbox - * API key lists the installs on that sandbox, and the key of an app’s managed sandbox filtering - * by {@code app} lists that app’s installs across every sandbox. For existing accounts that still - * use legacy test mode, a test mode key lists legacy test mode installs. + * Returns a list of app installs. An app developer filtering by its own app with its own key sees + * that app’s installs across the accounts that installed it. An app developer acting on a + * connected account through {@code Stripe-Account} and filtering by its app sees that account’s + * installs of the app, and an embedding platform acting on a connected account sees only the + * installs it created there. Other callers see the installs on their own account. A live key + * lists live installs and a test key lists test installs; the key of an app’s managed sandbox + * filtering by {@code app} lists that app’s installs across every sandbox. */ public StripeCollection list(InstallListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of app installs. An app developer or embedding platform filtering by its own app - * sees the installs across the accounts that installed it; other callers see the installs on - * their own account. The key selects the environment: a live key lists live installs, a sandbox - * API key lists the installs on that sandbox, and the key of an app’s managed sandbox filtering - * by {@code app} lists that app’s installs across every sandbox. For existing accounts that still - * use legacy test mode, a test mode key lists legacy test mode installs. + * Returns a list of app installs. An app developer filtering by its own app with its own key sees + * that app’s installs across the accounts that installed it. An app developer acting on a + * connected account through {@code Stripe-Account} and filtering by its app sees that account’s + * installs of the app, and an embedding platform acting on a connected account sees only the + * installs it created there. Other callers see the installs on their own account. A live key + * lists live installs and a test key lists test installs; the key of an app’s managed sandbox + * filtering by {@code app} lists that app’s installs across every sandbox. */ public StripeCollection list(RequestOptions options) throws StripeException { return list((InstallListParams) null, options); } /** - * Returns a list of app installs. An app developer or embedding platform filtering by its own app - * sees the installs across the accounts that installed it; other callers see the installs on - * their own account. The key selects the environment: a live key lists live installs, a sandbox - * API key lists the installs on that sandbox, and the key of an app’s managed sandbox filtering - * by {@code app} lists that app’s installs across every sandbox. For existing accounts that still - * use legacy test mode, a test mode key lists legacy test mode installs. + * Returns a list of app installs. An app developer filtering by its own app with its own key sees + * that app’s installs across the accounts that installed it. An app developer acting on a + * connected account through {@code Stripe-Account} and filtering by its app sees that account’s + * installs of the app, and an embedding platform acting on a connected account sees only the + * installs it created there. Other callers see the installs on their own account. A live key + * lists live installs and a test key lists test installs; the key of an app’s managed sandbox + * filtering by {@code app} lists that app’s installs across every sandbox. */ public StripeCollection list() throws StripeException { return list((InstallListParams) null, (RequestOptions) null); } /** - * Returns a list of app installs. An app developer or embedding platform filtering by its own app - * sees the installs across the accounts that installed it; other callers see the installs on - * their own account. The key selects the environment: a live key lists live installs, a sandbox - * API key lists the installs on that sandbox, and the key of an app’s managed sandbox filtering - * by {@code app} lists that app’s installs across every sandbox. For existing accounts that still - * use legacy test mode, a test mode key lists legacy test mode installs. + * Returns a list of app installs. An app developer filtering by its own app with its own key sees + * that app’s installs across the accounts that installed it. An app developer acting on a + * connected account through {@code Stripe-Account} and filtering by its app sees that account’s + * installs of the app, and an embedding platform acting on a connected account sees only the + * installs it created there. Other callers see the installs on their own account. A live key + * lists live installs and a test key lists test installs; the key of an app’s managed sandbox + * filtering by {@code app} lists that app’s installs across every sandbox. */ public StripeCollection list(InstallListParams params, RequestOptions options) throws StripeException { @@ -78,20 +82,22 @@ public StripeCollection list(InstallListParams params, RequestOptions o } /** * Creates an app install. An account installs its own private app with its own key; public and - * testing installs are made from the Dashboard. An app developer or embedding platform acting on - * a connected account through {@code Stripe-Account} installs or reinstalls its app there. For a - * private app, creating an install installs the newest completed upload; when that version is - * already installed with nothing pending, the existing install is returned. + * testing installs are made from the Dashboard. An app developer acting on a connected account + * through {@code Stripe-Account} installs or reinstalls its app there, and an embedding platform + * can do the same once the app’s developer approves its request to embed the app. For a private + * app, creating an install installs the newest completed upload; when that version is already + * installed with nothing pending, the existing install is returned. */ public Install create(InstallCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } /** * Creates an app install. An account installs its own private app with its own key; public and - * testing installs are made from the Dashboard. An app developer or embedding platform acting on - * a connected account through {@code Stripe-Account} installs or reinstalls its app there. For a - * private app, creating an install installs the newest completed upload; when that version is - * already installed with nothing pending, the existing install is returned. + * testing installs are made from the Dashboard. An app developer acting on a connected account + * through {@code Stripe-Account} installs or reinstalls its app there, and an embedding platform + * can do the same once the app’s developer approves its request to embed the app. For a private + * app, creating an install installs the newest completed upload; when that version is already + * installed with nothing pending, the existing install is returned. */ public Install create(InstallCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/apps/installs"; @@ -148,9 +154,12 @@ public Install retrieve(String id, InstallRetrieveParams params, RequestOptions /** * Reauthorizes an app install. The installer grants the permissions, content security policy * entries, and endpoints that the version being installed requests. An account reauthorizes its - * own installs on any channel with its own key; app developers and embedding platforms - * reauthorize installs on connected accounts through {@code Stripe-Account}. For private apps, - * the version being installed is the newest completed upload. + * own installs on any channel with its own key, which grants all of that access, so only give + * {@code app_install_write} to keys that may approve an app’s access. App developers and + * embedding platforms reauthorize installs on connected accounts through {@code Stripe-Account}. + * An app developer can’t grant new access. An embedding platform can grant new access only once + * the app’s developer approves its request to embed the app. For private apps, the version being + * installed is the newest completed upload. */ public Install update(String id, InstallUpdateParams params) throws StripeException { return update(id, params, (RequestOptions) null); @@ -158,9 +167,12 @@ public Install update(String id, InstallUpdateParams params) throws StripeExcept /** * Reauthorizes an app install. The installer grants the permissions, content security policy * entries, and endpoints that the version being installed requests. An account reauthorizes its - * own installs on any channel with its own key; app developers and embedding platforms - * reauthorize installs on connected accounts through {@code Stripe-Account}. For private apps, - * the version being installed is the newest completed upload. + * own installs on any channel with its own key, which grants all of that access, so only give + * {@code app_install_write} to keys that may approve an app’s access. App developers and + * embedding platforms reauthorize installs on connected accounts through {@code Stripe-Account}. + * An app developer can’t grant new access. An embedding platform can grant new access only once + * the app’s developer approves its request to embed the app. For private apps, the version being + * installed is the newest completed upload. */ public Install update(String id, RequestOptions options) throws StripeException { return update(id, (InstallUpdateParams) null, options); @@ -168,9 +180,12 @@ public Install update(String id, RequestOptions options) throws StripeException /** * Reauthorizes an app install. The installer grants the permissions, content security policy * entries, and endpoints that the version being installed requests. An account reauthorizes its - * own installs on any channel with its own key; app developers and embedding platforms - * reauthorize installs on connected accounts through {@code Stripe-Account}. For private apps, - * the version being installed is the newest completed upload. + * own installs on any channel with its own key, which grants all of that access, so only give + * {@code app_install_write} to keys that may approve an app’s access. App developers and + * embedding platforms reauthorize installs on connected accounts through {@code Stripe-Account}. + * An app developer can’t grant new access. An embedding platform can grant new access only once + * the app’s developer approves its request to embed the app. For private apps, the version being + * installed is the newest completed upload. */ public Install update(String id) throws StripeException { return update(id, (InstallUpdateParams) null, (RequestOptions) null); @@ -178,9 +193,12 @@ public Install update(String id) throws StripeException { /** * Reauthorizes an app install. The installer grants the permissions, content security policy * entries, and endpoints that the version being installed requests. An account reauthorizes its - * own installs on any channel with its own key; app developers and embedding platforms - * reauthorize installs on connected accounts through {@code Stripe-Account}. For private apps, - * the version being installed is the newest completed upload. + * own installs on any channel with its own key, which grants all of that access, so only give + * {@code app_install_write} to keys that may approve an app’s access. App developers and + * embedding platforms reauthorize installs on connected accounts through {@code Stripe-Account}. + * An app developer can’t grant new access. An embedding platform can grant new access only once + * the app’s developer approves its request to embed the app. For private apps, the version being + * installed is the newest completed upload. */ public Install update(String id, InstallUpdateParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/testhelpers/CustomerService.java b/src/main/java/com/stripe/service/testhelpers/CustomerService.java index 65cc27adb09d..64afc8a7de35 100644 --- a/src/main/java/com/stripe/service/testhelpers/CustomerService.java +++ b/src/main/java/com/stripe/service/testhelpers/CustomerService.java @@ -17,12 +17,12 @@ public CustomerService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** Create an incoming testmode bank transfer. */ + /** Create a test incoming bank transfer. */ public CustomerCashBalanceTransaction fundCashBalance( String customer, CustomerFundCashBalanceParams params) throws StripeException { return fundCashBalance(customer, params, (RequestOptions) null); } - /** Create an incoming testmode bank transfer. */ + /** Create a test incoming bank transfer. */ public CustomerCashBalanceTransaction fundCashBalance( String customer, CustomerFundCashBalanceParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/v2/CoreService.java b/src/main/java/com/stripe/service/v2/CoreService.java index 6f38dc21be79..8e1990f3696f 100644 --- a/src/main/java/com/stripe/service/v2/CoreService.java +++ b/src/main/java/com/stripe/service/v2/CoreService.java @@ -28,4 +28,8 @@ public com.stripe.service.v2.core.EventDestinationService eventDestinations() { public com.stripe.service.v2.core.EventService events() { return new com.stripe.service.v2.core.EventService(this.getResponseGetter()); } + + public com.stripe.service.v2.core.VaultService vault() { + return new com.stripe.service.v2.core.VaultService(this.getResponseGetter()); + } } diff --git a/src/main/java/com/stripe/service/v2/MoneyManagementService.java b/src/main/java/com/stripe/service/v2/MoneyManagementService.java new file mode 100644 index 000000000000..9334725b8874 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/MoneyManagementService.java @@ -0,0 +1,78 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class MoneyManagementService extends ApiService { + public MoneyManagementService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.v2.moneymanagement.AdjustmentService adjustments() { + return new com.stripe.service.v2.moneymanagement.AdjustmentService(this.getResponseGetter()); + } + + public com.stripe.service.v2.moneymanagement.FinancialAccountService financialAccounts() { + return new com.stripe.service.v2.moneymanagement.FinancialAccountService( + this.getResponseGetter()); + } + + public com.stripe.service.v2.moneymanagement.FinancialAddressService financialAddresses() { + return new com.stripe.service.v2.moneymanagement.FinancialAddressService( + this.getResponseGetter()); + } + + public com.stripe.service.v2.moneymanagement.InboundTransferService inboundTransfers() { + return new com.stripe.service.v2.moneymanagement.InboundTransferService( + this.getResponseGetter()); + } + + public com.stripe.service.v2.moneymanagement.OutboundPaymentService outboundPayments() { + return new com.stripe.service.v2.moneymanagement.OutboundPaymentService( + this.getResponseGetter()); + } + + public com.stripe.service.v2.moneymanagement.OutboundSetupIntentService outboundSetupIntents() { + return new com.stripe.service.v2.moneymanagement.OutboundSetupIntentService( + this.getResponseGetter()); + } + + public com.stripe.service.v2.moneymanagement.PayoutIntentService payoutIntents() { + return new com.stripe.service.v2.moneymanagement.PayoutIntentService(this.getResponseGetter()); + } + + public com.stripe.service.v2.moneymanagement.PayoutMethodService payoutMethods() { + return new com.stripe.service.v2.moneymanagement.PayoutMethodService(this.getResponseGetter()); + } + + public com.stripe.service.v2.moneymanagement.PayoutMethodsBankAccountSpecService + payoutMethodsBankAccountSpec() { + return new com.stripe.service.v2.moneymanagement.PayoutMethodsBankAccountSpecService( + this.getResponseGetter()); + } + + public com.stripe.service.v2.moneymanagement.ReceivedCreditService receivedCredits() { + return new com.stripe.service.v2.moneymanagement.ReceivedCreditService( + this.getResponseGetter()); + } + + public com.stripe.service.v2.moneymanagement.RecipientVerificationService + recipientVerifications() { + return new com.stripe.service.v2.moneymanagement.RecipientVerificationService( + this.getResponseGetter()); + } + + public com.stripe.service.v2.moneymanagement.TestHelpersService testHelpers() { + return new com.stripe.service.v2.moneymanagement.TestHelpersService(this.getResponseGetter()); + } + + public com.stripe.service.v2.moneymanagement.TransactionEntryService transactionEntries() { + return new com.stripe.service.v2.moneymanagement.TransactionEntryService( + this.getResponseGetter()); + } + + public com.stripe.service.v2.moneymanagement.TransactionService transactions() { + return new com.stripe.service.v2.moneymanagement.TransactionService(this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/TestHelperService.java b/src/main/java/com/stripe/service/v2/TestHelperService.java new file mode 100644 index 000000000000..447309731cb5 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/TestHelperService.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class TestHelperService extends ApiService { + public TestHelperService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.v2.testhelpers.MoneyManagementService moneyManagement() { + return new com.stripe.service.v2.testhelpers.MoneyManagementService(this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/core/VaultService.java b/src/main/java/com/stripe/service/v2/core/VaultService.java new file mode 100644 index 000000000000..09d316ad2966 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/core/VaultService.java @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.core; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class VaultService extends ApiService { + public VaultService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.v2.core.vault.GbBankAccountService gbBankAccounts() { + return new com.stripe.service.v2.core.vault.GbBankAccountService(this.getResponseGetter()); + } + + public com.stripe.service.v2.core.vault.UsBankAccountService usBankAccounts() { + return new com.stripe.service.v2.core.vault.UsBankAccountService(this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/core/vault/GbBankAccountService.java b/src/main/java/com/stripe/service/v2/core/vault/GbBankAccountService.java new file mode 100644 index 000000000000..a651609c5e2f --- /dev/null +++ b/src/main/java/com/stripe/service/v2/core/vault/GbBankAccountService.java @@ -0,0 +1,127 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.core.vault; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.BlockedByStripeException; +import com.stripe.exception.CannotProceedException; +import com.stripe.exception.ControlledByAlternateResourceException; +import com.stripe.exception.InvalidVaultedCredentialException; +import com.stripe.exception.QuotaExceededException; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.core.vault.GbBankAccount; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.core.vault.GbBankAccountCreateParams; +import com.stripe.param.v2.core.vault.GbBankAccountListParams; + +public final class GbBankAccountService extends ApiService { + public GbBankAccountService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * List objects that can be used as destinations for outbound money movement via OutboundPayment. + */ + public StripeCollection list(GbBankAccountListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** + * List objects that can be used as destinations for outbound money movement via OutboundPayment. + */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((GbBankAccountListParams) null, options); + } + /** + * List objects that can be used as destinations for outbound money movement via OutboundPayment. + */ + public StripeCollection list() throws StripeException { + return list((GbBankAccountListParams) null, (RequestOptions) null); + } + /** + * List objects that can be used as destinations for outbound money movement via OutboundPayment. + */ + public StripeCollection list( + GbBankAccountListParams params, RequestOptions options) throws StripeException { + String path = "/v2/core/vault/gb_bank_accounts"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Create a GB bank account. */ + public GbBankAccount create(GbBankAccountCreateParams params) + throws StripeException, BlockedByStripeException, CannotProceedException, + InvalidVaultedCredentialException, QuotaExceededException { + return create(params, (RequestOptions) null); + } + /** Create a GB bank account. */ + public GbBankAccount create(GbBankAccountCreateParams params, RequestOptions options) + throws StripeException, BlockedByStripeException, CannotProceedException, + InvalidVaultedCredentialException, QuotaExceededException { + String path = "/v2/core/vault/gb_bank_accounts"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, GbBankAccount.class); + } + /** Retrieve a GB bank account. */ + public GbBankAccount retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieve a GB bank account. */ + public GbBankAccount retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/core/vault/gb_bank_accounts/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, GbBankAccount.class); + } + /** + * Archive a GBBankAccount object. Archived GBBankAccount objects cannot be used as outbound + * destinations and will not appear in the outbound destination list. + */ + public GbBankAccount archive(String id) + throws StripeException, CannotProceedException, ControlledByAlternateResourceException { + return archive(id, (RequestOptions) null); + } + /** + * Archive a GBBankAccount object. Archived GBBankAccount objects cannot be used as outbound + * destinations and will not appear in the outbound destination list. + */ + public GbBankAccount archive(String id, RequestOptions options) + throws StripeException, CannotProceedException, ControlledByAlternateResourceException { + String path = + String.format("/v2/core/vault/gb_bank_accounts/%s/archive", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, GbBankAccount.class); + } + /** Unarchive a GBBankAccount object. */ + public GbBankAccount unarchive(String id) + throws StripeException, ControlledByAlternateResourceException { + return unarchive(id, (RequestOptions) null); + } + /** Unarchive a GBBankAccount object. */ + public GbBankAccount unarchive(String id, RequestOptions options) + throws StripeException, ControlledByAlternateResourceException { + String path = + String.format("/v2/core/vault/gb_bank_accounts/%s/unarchive", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, GbBankAccount.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/core/vault/UsBankAccountService.java b/src/main/java/com/stripe/service/v2/core/vault/UsBankAccountService.java new file mode 100644 index 000000000000..9179ca38c52e --- /dev/null +++ b/src/main/java/com/stripe/service/v2/core/vault/UsBankAccountService.java @@ -0,0 +1,251 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.core.vault; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.BlockedByStripeException; +import com.stripe.exception.CannotProceedException; +import com.stripe.exception.ControlledByAlternateResourceException; +import com.stripe.exception.InvalidPaymentMethodException; +import com.stripe.exception.QuotaExceededException; +import com.stripe.exception.StripeException; +import com.stripe.exception.VerificationAttemptFailedException; +import com.stripe.exception.VerificationExpiredException; +import com.stripe.exception.VerificationNotInitiatedException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.core.vault.UsBankAccount; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.core.vault.UsBankAccountConfirmMicrodepositsParams; +import com.stripe.param.v2.core.vault.UsBankAccountCreateParams; +import com.stripe.param.v2.core.vault.UsBankAccountListParams; +import com.stripe.param.v2.core.vault.UsBankAccountUpdateParams; + +public final class UsBankAccountService extends ApiService { + public UsBankAccountService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** List USBankAccount objects. Optionally filter by verification status. */ + public StripeCollection list(UsBankAccountListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** List USBankAccount objects. Optionally filter by verification status. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((UsBankAccountListParams) null, options); + } + /** List USBankAccount objects. Optionally filter by verification status. */ + public StripeCollection list() throws StripeException { + return list((UsBankAccountListParams) null, (RequestOptions) null); + } + /** List USBankAccount objects. Optionally filter by verification status. */ + public StripeCollection list( + UsBankAccountListParams params, RequestOptions options) throws StripeException { + String path = "/v2/core/vault/us_bank_accounts"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Create a USBankAccount object. */ + public UsBankAccount create(UsBankAccountCreateParams params) + throws StripeException, BlockedByStripeException, InvalidPaymentMethodException, + QuotaExceededException, CannotProceedException { + return create(params, (RequestOptions) null); + } + /** Create a USBankAccount object. */ + public UsBankAccount create(UsBankAccountCreateParams params, RequestOptions options) + throws StripeException, BlockedByStripeException, InvalidPaymentMethodException, + QuotaExceededException, CannotProceedException { + String path = "/v2/core/vault/us_bank_accounts"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, UsBankAccount.class); + } + /** Retrieve a USBankAccount object. */ + public UsBankAccount retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieve a USBankAccount object. */ + public UsBankAccount retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/core/vault/us_bank_accounts/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, UsBankAccount.class); + } + /** + * Update a USBankAccount object. This is limited to supplying a previously empty routing_number + * field. + */ + public UsBankAccount update(String id, UsBankAccountUpdateParams params) + throws StripeException, BlockedByStripeException, InvalidPaymentMethodException, + QuotaExceededException, CannotProceedException { + return update(id, params, (RequestOptions) null); + } + /** + * Update a USBankAccount object. This is limited to supplying a previously empty routing_number + * field. + */ + public UsBankAccount update(String id, RequestOptions options) + throws StripeException, BlockedByStripeException, InvalidPaymentMethodException, + QuotaExceededException, CannotProceedException { + return update(id, (UsBankAccountUpdateParams) null, options); + } + /** + * Update a USBankAccount object. This is limited to supplying a previously empty routing_number + * field. + */ + public UsBankAccount update(String id) + throws StripeException, BlockedByStripeException, InvalidPaymentMethodException, + QuotaExceededException, CannotProceedException { + return update(id, (UsBankAccountUpdateParams) null, (RequestOptions) null); + } + /** + * Update a USBankAccount object. This is limited to supplying a previously empty routing_number + * field. + */ + public UsBankAccount update(String id, UsBankAccountUpdateParams params, RequestOptions options) + throws StripeException, BlockedByStripeException, InvalidPaymentMethodException, + QuotaExceededException, CannotProceedException { + String path = String.format("/v2/core/vault/us_bank_accounts/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, UsBankAccount.class); + } + /** + * Archive a USBankAccount object. USBankAccount objects will not be automatically archived by + * Stripe. Archived USBankAccount objects cannot be used as outbound destinations and will not + * appear in the outbound destination list. + */ + public UsBankAccount archive(String id) + throws StripeException, CannotProceedException, ControlledByAlternateResourceException { + return archive(id, (RequestOptions) null); + } + /** + * Archive a USBankAccount object. USBankAccount objects will not be automatically archived by + * Stripe. Archived USBankAccount objects cannot be used as outbound destinations and will not + * appear in the outbound destination list. + */ + public UsBankAccount archive(String id, RequestOptions options) + throws StripeException, CannotProceedException, ControlledByAlternateResourceException { + String path = + String.format("/v2/core/vault/us_bank_accounts/%s/archive", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, UsBankAccount.class); + } + /** + * Confirm microdeposits amounts or descriptor code that you have received from the Send + * Microdeposits request. Once you correctly confirm this, this US Bank Account will be verified + * and eligible to transfer funds with. + */ + public UsBankAccount confirmMicrodeposits( + String id, UsBankAccountConfirmMicrodepositsParams params) + throws StripeException, VerificationAttemptFailedException, + ControlledByAlternateResourceException, VerificationNotInitiatedException, + VerificationExpiredException { + return confirmMicrodeposits(id, params, (RequestOptions) null); + } + /** + * Confirm microdeposits amounts or descriptor code that you have received from the Send + * Microdeposits request. Once you correctly confirm this, this US Bank Account will be verified + * and eligible to transfer funds with. + */ + public UsBankAccount confirmMicrodeposits(String id, RequestOptions options) + throws StripeException, VerificationAttemptFailedException, + ControlledByAlternateResourceException, VerificationNotInitiatedException, + VerificationExpiredException { + return confirmMicrodeposits(id, (UsBankAccountConfirmMicrodepositsParams) null, options); + } + /** + * Confirm microdeposits amounts or descriptor code that you have received from the Send + * Microdeposits request. Once you correctly confirm this, this US Bank Account will be verified + * and eligible to transfer funds with. + */ + public UsBankAccount confirmMicrodeposits(String id) + throws StripeException, VerificationAttemptFailedException, + ControlledByAlternateResourceException, VerificationNotInitiatedException, + VerificationExpiredException { + return confirmMicrodeposits( + id, (UsBankAccountConfirmMicrodepositsParams) null, (RequestOptions) null); + } + /** + * Confirm microdeposits amounts or descriptor code that you have received from the Send + * Microdeposits request. Once you correctly confirm this, this US Bank Account will be verified + * and eligible to transfer funds with. + */ + public UsBankAccount confirmMicrodeposits( + String id, UsBankAccountConfirmMicrodepositsParams params, RequestOptions options) + throws StripeException, VerificationAttemptFailedException, + ControlledByAlternateResourceException, VerificationNotInitiatedException, + VerificationExpiredException { + String path = + String.format( + "/v2/core/vault/us_bank_accounts/%s/confirm_microdeposits", + ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, UsBankAccount.class); + } + /** + * Send microdeposits in order to verify your US Bank Account so it is eligible to transfer funds. + * This will start the verification process and you must Confirm Microdeposits to successfully + * verify your US Bank Account. + */ + public UsBankAccount sendMicrodeposits(String id) + throws StripeException, ControlledByAlternateResourceException, CannotProceedException { + return sendMicrodeposits(id, (RequestOptions) null); + } + /** + * Send microdeposits in order to verify your US Bank Account so it is eligible to transfer funds. + * This will start the verification process and you must Confirm Microdeposits to successfully + * verify your US Bank Account. + */ + public UsBankAccount sendMicrodeposits(String id, RequestOptions options) + throws StripeException, ControlledByAlternateResourceException, CannotProceedException { + String path = + String.format( + "/v2/core/vault/us_bank_accounts/%s/send_microdeposits", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, UsBankAccount.class); + } + /** Unarchive a USBankAccount object. */ + public UsBankAccount unarchive(String id) + throws StripeException, ControlledByAlternateResourceException { + return unarchive(id, (RequestOptions) null); + } + /** Unarchive a USBankAccount object. */ + public UsBankAccount unarchive(String id, RequestOptions options) + throws StripeException, ControlledByAlternateResourceException { + String path = + String.format("/v2/core/vault/us_bank_accounts/%s/unarchive", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, UsBankAccount.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/AdjustmentService.java b/src/main/java/com/stripe/service/v2/moneymanagement/AdjustmentService.java new file mode 100644 index 000000000000..215e28d8c79a --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/AdjustmentService.java @@ -0,0 +1,58 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.moneymanagement.Adjustment; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.AdjustmentListParams; + +public final class AdjustmentService extends ApiService { + public AdjustmentService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Returns a list of Adjustments that match the provided filters. */ + public StripeCollection list(AdjustmentListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + /** Returns a list of Adjustments that match the provided filters. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((AdjustmentListParams) null, options); + } + /** Returns a list of Adjustments that match the provided filters. */ + public StripeCollection list() throws StripeException { + return list((AdjustmentListParams) null, (RequestOptions) null); + } + /** Returns a list of Adjustments that match the provided filters. */ + public StripeCollection list(AdjustmentListParams params, RequestOptions options) + throws StripeException { + String path = "/v2/money_management/adjustments"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Retrieves the details of an Adjustment by ID. */ + public Adjustment retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieves the details of an Adjustment by ID. */ + public Adjustment retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/money_management/adjustments/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, Adjustment.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/FinancialAccountService.java b/src/main/java/com/stripe/service/v2/moneymanagement/FinancialAccountService.java new file mode 100644 index 000000000000..46ba168058fd --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/FinancialAccountService.java @@ -0,0 +1,106 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.moneymanagement.FinancialAccount; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.FinancialAccountListParams; +import com.stripe.param.v2.moneymanagement.FinancialAccountRetrieveParams; +import com.stripe.param.v2.moneymanagement.FinancialAccountUpdateParams; + +public final class FinancialAccountService extends ApiService { + public FinancialAccountService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Returns a list of FinancialAccounts in your account that match the provided filters. */ + public StripeCollection list(FinancialAccountListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** Returns a list of FinancialAccounts in your account that match the provided filters. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((FinancialAccountListParams) null, options); + } + /** Returns a list of FinancialAccounts in your account that match the provided filters. */ + public StripeCollection list() throws StripeException { + return list((FinancialAccountListParams) null, (RequestOptions) null); + } + /** Returns a list of FinancialAccounts in your account that match the provided filters. */ + public StripeCollection list( + FinancialAccountListParams params, RequestOptions options) throws StripeException { + String path = "/v2/money_management/financial_accounts"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Retrieves the details of an existing FinancialAccount. */ + public FinancialAccount retrieve(String id, FinancialAccountRetrieveParams params) + throws StripeException { + return retrieve(id, params, (RequestOptions) null); + } + /** Retrieves the details of an existing FinancialAccount. */ + public FinancialAccount retrieve(String id, RequestOptions options) throws StripeException { + return retrieve(id, (FinancialAccountRetrieveParams) null, options); + } + /** Retrieves the details of an existing FinancialAccount. */ + public FinancialAccount retrieve(String id) throws StripeException { + return retrieve(id, (FinancialAccountRetrieveParams) null, (RequestOptions) null); + } + /** Retrieves the details of an existing FinancialAccount. */ + public FinancialAccount retrieve( + String id, FinancialAccountRetrieveParams params, RequestOptions options) + throws StripeException { + String path = + String.format("/v2/money_management/financial_accounts/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, FinancialAccount.class); + } + /** Updates an existing FinancialAccount using the provided parameters. */ + public FinancialAccount update(String id, FinancialAccountUpdateParams params) + throws StripeException { + return update(id, params, (RequestOptions) null); + } + /** Updates an existing FinancialAccount using the provided parameters. */ + public FinancialAccount update(String id, RequestOptions options) throws StripeException { + return update(id, (FinancialAccountUpdateParams) null, options); + } + /** Updates an existing FinancialAccount using the provided parameters. */ + public FinancialAccount update(String id) throws StripeException { + return update(id, (FinancialAccountUpdateParams) null, (RequestOptions) null); + } + /** Updates an existing FinancialAccount using the provided parameters. */ + public FinancialAccount update( + String id, FinancialAccountUpdateParams params, RequestOptions options) + throws StripeException { + String path = + String.format("/v2/money_management/financial_accounts/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, FinancialAccount.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/FinancialAddressService.java b/src/main/java/com/stripe/service/v2/moneymanagement/FinancialAddressService.java new file mode 100644 index 000000000000..b53768061d52 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/FinancialAddressService.java @@ -0,0 +1,81 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.FeatureNotEnabledException; +import com.stripe.exception.FinancialAccountNotOpenException; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.moneymanagement.FinancialAddress; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams; +import com.stripe.param.v2.moneymanagement.FinancialAddressListParams; + +public final class FinancialAddressService extends ApiService { + public FinancialAddressService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** List all FinancialAddresses for a FinancialAccount (V2 shape). */ + public StripeCollection list(FinancialAddressListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** List all FinancialAddresses for a FinancialAccount (V2 shape). */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((FinancialAddressListParams) null, options); + } + /** List all FinancialAddresses for a FinancialAccount (V2 shape). */ + public StripeCollection list() throws StripeException { + return list((FinancialAddressListParams) null, (RequestOptions) null); + } + /** List all FinancialAddresses for a FinancialAccount (V2 shape). */ + public StripeCollection list( + FinancialAddressListParams params, RequestOptions options) throws StripeException { + String path = "/v2/money_management/financial_addresses"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Create a new FinancialAddress for a FinancialAccount (V2 shape). */ + public FinancialAddress create(FinancialAddressCreateParams params) + throws StripeException, FinancialAccountNotOpenException, FeatureNotEnabledException { + return create(params, (RequestOptions) null); + } + /** Create a new FinancialAddress for a FinancialAccount (V2 shape). */ + public FinancialAddress create(FinancialAddressCreateParams params, RequestOptions options) + throws StripeException, FinancialAccountNotOpenException, FeatureNotEnabledException { + String path = "/v2/money_management/financial_addresses"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, FinancialAddress.class); + } + /** Retrieve a FinancialAddress (V2 shape). */ + public FinancialAddress retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieve a FinancialAddress (V2 shape). */ + public FinancialAddress retrieve(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/money_management/financial_addresses/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, FinancialAddress.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/InboundTransferService.java b/src/main/java/com/stripe/service/v2/moneymanagement/InboundTransferService.java new file mode 100644 index 000000000000..28a3b4b71db6 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/InboundTransferService.java @@ -0,0 +1,88 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.BlockedByStripeException; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.InboundTransferCreateParams; +import com.stripe.param.v2.moneymanagement.InboundTransferListParams; + +public final class InboundTransferService extends ApiService { + public InboundTransferService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Retrieves a list of InboundTransfers. */ + public StripeCollection list(InboundTransferListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** Retrieves a list of InboundTransfers. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((InboundTransferListParams) null, options); + } + /** Retrieves a list of InboundTransfers. */ + public StripeCollection list() throws StripeException { + return list((InboundTransferListParams) null, (RequestOptions) null); + } + /** Retrieves a list of InboundTransfers. */ + public StripeCollection list( + InboundTransferListParams params, RequestOptions options) throws StripeException { + String path = "/v2/money_management/inbound_transfers"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** + * Creates an InboundTransfer to pull funds from a bank account into a financial account. + * Per-transfer and rolling weekly limits vary by account and payment rail. See transfer limits. + */ + public InboundTransfer create(InboundTransferCreateParams params) + throws StripeException, BlockedByStripeException { + return create(params, (RequestOptions) null); + } + /** + * Creates an InboundTransfer to pull funds from a bank account into a financial account. + * Per-transfer and rolling weekly limits vary by account and payment rail. See transfer limits. + */ + public InboundTransfer create(InboundTransferCreateParams params, RequestOptions options) + throws StripeException, BlockedByStripeException { + String path = "/v2/money_management/inbound_transfers"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, InboundTransfer.class); + } + /** Retrieve an InboundTransfer by ID. */ + public InboundTransfer retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieve an InboundTransfer by ID. */ + public InboundTransfer retrieve(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/money_management/inbound_transfers/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, InboundTransfer.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/OutboundPaymentService.java b/src/main/java/com/stripe/service/v2/moneymanagement/OutboundPaymentService.java new file mode 100644 index 000000000000..2e1c9f21104d --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/OutboundPaymentService.java @@ -0,0 +1,112 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.AlreadyCanceledException; +import com.stripe.exception.BlockedByStripeException; +import com.stripe.exception.CapabilityNotEnabledException; +import com.stripe.exception.FeatureNotEnabledException; +import com.stripe.exception.InsufficientFundsException; +import com.stripe.exception.NotCancelableException; +import com.stripe.exception.QuotaExceededException; +import com.stripe.exception.RecipientNotNotifiableException; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams; +import com.stripe.param.v2.moneymanagement.OutboundPaymentListParams; + +public final class OutboundPaymentService extends ApiService { + public OutboundPaymentService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Returns a list of OutboundPayments that match the provided filters. */ + public StripeCollection list(OutboundPaymentListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** Returns a list of OutboundPayments that match the provided filters. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((OutboundPaymentListParams) null, options); + } + /** Returns a list of OutboundPayments that match the provided filters. */ + public StripeCollection list() throws StripeException { + return list((OutboundPaymentListParams) null, (RequestOptions) null); + } + /** Returns a list of OutboundPayments that match the provided filters. */ + public StripeCollection list( + OutboundPaymentListParams params, RequestOptions options) throws StripeException { + String path = "/v2/money_management/outbound_payments"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Creates an OutboundPayment. */ + public OutboundPayment create(OutboundPaymentCreateParams params) + throws StripeException, BlockedByStripeException, InsufficientFundsException, + CapabilityNotEnabledException, QuotaExceededException, RecipientNotNotifiableException, + FeatureNotEnabledException { + return create(params, (RequestOptions) null); + } + /** Creates an OutboundPayment. */ + public OutboundPayment create(OutboundPaymentCreateParams params, RequestOptions options) + throws StripeException, BlockedByStripeException, InsufficientFundsException, + CapabilityNotEnabledException, QuotaExceededException, RecipientNotNotifiableException, + FeatureNotEnabledException { + String path = "/v2/money_management/outbound_payments"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, OutboundPayment.class); + } + /** + * Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID + * from either the OutboundPayment create or list response. + */ + public OutboundPayment retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** + * Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID + * from either the OutboundPayment create or list response. + */ + public OutboundPayment retrieve(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/money_management/outbound_payments/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, OutboundPayment.class); + } + /** Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. */ + public OutboundPayment cancel(String id) + throws StripeException, AlreadyCanceledException, NotCancelableException { + return cancel(id, (RequestOptions) null); + } + /** Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. */ + public OutboundPayment cancel(String id, RequestOptions options) + throws StripeException, AlreadyCanceledException, NotCancelableException { + String path = + String.format( + "/v2/money_management/outbound_payments/%s/cancel", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, OutboundPayment.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/OutboundSetupIntentService.java b/src/main/java/com/stripe/service/v2/moneymanagement/OutboundSetupIntentService.java new file mode 100644 index 000000000000..d9d178e718cf --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/OutboundSetupIntentService.java @@ -0,0 +1,153 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.BlockedByStripeException; +import com.stripe.exception.CannotProceedException; +import com.stripe.exception.ControlledByAlternateResourceException; +import com.stripe.exception.InvalidPayoutMethodException; +import com.stripe.exception.QuotaExceededException; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.moneymanagement.OutboundSetupIntent; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.OutboundSetupIntentCreateParams; +import com.stripe.param.v2.moneymanagement.OutboundSetupIntentListParams; +import com.stripe.param.v2.moneymanagement.OutboundSetupIntentUpdateParams; + +public final class OutboundSetupIntentService extends ApiService { + public OutboundSetupIntentService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** List the OutboundSetupIntent objects. */ + public StripeCollection list(OutboundSetupIntentListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** List the OutboundSetupIntent objects. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((OutboundSetupIntentListParams) null, options); + } + /** List the OutboundSetupIntent objects. */ + public StripeCollection list() throws StripeException { + return list((OutboundSetupIntentListParams) null, (RequestOptions) null); + } + /** List the OutboundSetupIntent objects. */ + public StripeCollection list( + OutboundSetupIntentListParams params, RequestOptions options) throws StripeException { + String path = "/v2/money_management/outbound_setup_intents"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request( + request, new TypeToken>() {}.getType()); + } + /** Create an OutboundSetupIntent object. */ + public OutboundSetupIntent create(OutboundSetupIntentCreateParams params) + throws StripeException, BlockedByStripeException, CannotProceedException, + InvalidPayoutMethodException, QuotaExceededException, + ControlledByAlternateResourceException { + return create(params, (RequestOptions) null); + } + /** Create an OutboundSetupIntent object. */ + public OutboundSetupIntent create(RequestOptions options) + throws StripeException, BlockedByStripeException, CannotProceedException, + InvalidPayoutMethodException, QuotaExceededException, + ControlledByAlternateResourceException { + return create((OutboundSetupIntentCreateParams) null, options); + } + /** Create an OutboundSetupIntent object. */ + public OutboundSetupIntent create() + throws StripeException, BlockedByStripeException, CannotProceedException, + InvalidPayoutMethodException, QuotaExceededException, + ControlledByAlternateResourceException { + return create((OutboundSetupIntentCreateParams) null, (RequestOptions) null); + } + /** Create an OutboundSetupIntent object. */ + public OutboundSetupIntent create(OutboundSetupIntentCreateParams params, RequestOptions options) + throws StripeException, BlockedByStripeException, CannotProceedException, + InvalidPayoutMethodException, QuotaExceededException, + ControlledByAlternateResourceException { + String path = "/v2/money_management/outbound_setup_intents"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, OutboundSetupIntent.class); + } + /** Retrieve an OutboundSetupIntent object. */ + public OutboundSetupIntent retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieve an OutboundSetupIntent object. */ + public OutboundSetupIntent retrieve(String id, RequestOptions options) throws StripeException { + String path = + String.format( + "/v2/money_management/outbound_setup_intents/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, OutboundSetupIntent.class); + } + /** Update an OutboundSetupIntent object. */ + public OutboundSetupIntent update(String id, OutboundSetupIntentUpdateParams params) + throws StripeException, BlockedByStripeException, InvalidPayoutMethodException, + ControlledByAlternateResourceException { + return update(id, params, (RequestOptions) null); + } + /** Update an OutboundSetupIntent object. */ + public OutboundSetupIntent update(String id, RequestOptions options) + throws StripeException, BlockedByStripeException, InvalidPayoutMethodException, + ControlledByAlternateResourceException { + return update(id, (OutboundSetupIntentUpdateParams) null, options); + } + /** Update an OutboundSetupIntent object. */ + public OutboundSetupIntent update(String id) + throws StripeException, BlockedByStripeException, InvalidPayoutMethodException, + ControlledByAlternateResourceException { + return update(id, (OutboundSetupIntentUpdateParams) null, (RequestOptions) null); + } + /** Update an OutboundSetupIntent object. */ + public OutboundSetupIntent update( + String id, OutboundSetupIntentUpdateParams params, RequestOptions options) + throws StripeException, BlockedByStripeException, InvalidPayoutMethodException, + ControlledByAlternateResourceException { + String path = + String.format( + "/v2/money_management/outbound_setup_intents/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, OutboundSetupIntent.class); + } + /** Cancel an OutboundSetupIntent object. */ + public OutboundSetupIntent cancel(String id) throws StripeException { + return cancel(id, (RequestOptions) null); + } + /** Cancel an OutboundSetupIntent object. */ + public OutboundSetupIntent cancel(String id, RequestOptions options) throws StripeException { + String path = + String.format( + "/v2/money_management/outbound_setup_intents/%s/cancel", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, OutboundSetupIntent.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/PayoutIntentService.java b/src/main/java/com/stripe/service/v2/moneymanagement/PayoutIntentService.java new file mode 100644 index 000000000000..da16bc8f5728 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/PayoutIntentService.java @@ -0,0 +1,186 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.CapabilityNotEnabledException; +import com.stripe.exception.FeatureNotEnabledException; +import com.stripe.exception.FxQuoteNeedsRefreshException; +import com.stripe.exception.NotCancelableException; +import com.stripe.exception.RecipientNotNotifiableException; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.moneymanagement.PayoutIntent; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.PayoutIntentCreateParams; +import com.stripe.param.v2.moneymanagement.PayoutIntentListParams; +import com.stripe.param.v2.moneymanagement.PayoutIntentUpdateParams; + +public final class PayoutIntentService extends ApiService { + public PayoutIntentService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Returns a list of PayoutIntents. */ + public StripeCollection list(PayoutIntentListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + /** Returns a list of PayoutIntents. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((PayoutIntentListParams) null, options); + } + /** Returns a list of PayoutIntents. */ + public StripeCollection list() throws StripeException { + return list((PayoutIntentListParams) null, (RequestOptions) null); + } + /** Returns a list of PayoutIntents. */ + public StripeCollection list(PayoutIntentListParams params, RequestOptions options) + throws StripeException { + String path = "/v2/money_management/payout_intents"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Creates a PayoutIntent. */ + public PayoutIntent create(PayoutIntentCreateParams params) + throws StripeException, CapabilityNotEnabledException, RecipientNotNotifiableException, + FeatureNotEnabledException { + return create(params, (RequestOptions) null); + } + /** Creates a PayoutIntent. */ + public PayoutIntent create(PayoutIntentCreateParams params, RequestOptions options) + throws StripeException, CapabilityNotEnabledException, RecipientNotNotifiableException, + FeatureNotEnabledException { + String path = "/v2/money_management/payout_intents"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PayoutIntent.class); + } + /** Retrieves the details of an existing PayoutIntent by passing the unique PayoutIntent ID. */ + public PayoutIntent retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieves the details of an existing PayoutIntent by passing the unique PayoutIntent ID. */ + public PayoutIntent retrieve(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/money_management/payout_intents/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, PayoutIntent.class); + } + /** Updates an editable PayoutIntent in the {@code pending} or {@code requires_action} state. */ + public PayoutIntent update(String id, PayoutIntentUpdateParams params) + throws StripeException, CapabilityNotEnabledException, RecipientNotNotifiableException, + FeatureNotEnabledException { + return update(id, params, (RequestOptions) null); + } + /** Updates an editable PayoutIntent in the {@code pending} or {@code requires_action} state. */ + public PayoutIntent update(String id, RequestOptions options) + throws StripeException, CapabilityNotEnabledException, RecipientNotNotifiableException, + FeatureNotEnabledException { + return update(id, (PayoutIntentUpdateParams) null, options); + } + /** Updates an editable PayoutIntent in the {@code pending} or {@code requires_action} state. */ + public PayoutIntent update(String id) + throws StripeException, CapabilityNotEnabledException, RecipientNotNotifiableException, + FeatureNotEnabledException { + return update(id, (PayoutIntentUpdateParams) null, (RequestOptions) null); + } + /** Updates an editable PayoutIntent in the {@code pending} or {@code requires_action} state. */ + public PayoutIntent update(String id, PayoutIntentUpdateParams params, RequestOptions options) + throws StripeException, CapabilityNotEnabledException, RecipientNotNotifiableException, + FeatureNotEnabledException { + String path = + String.format("/v2/money_management/payout_intents/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PayoutIntent.class); + } + /** + * Cancels a PayoutIntent in the {@code pending} or {@code requires_action} state, or a {@code + * processing} PayoutIntent with a cancelable OutboundPayment. + */ + public PayoutIntent cancel(String id) throws StripeException, NotCancelableException { + return cancel(id, (RequestOptions) null); + } + /** + * Cancels a PayoutIntent in the {@code pending} or {@code requires_action} state, or a {@code + * processing} PayoutIntent with a cancelable OutboundPayment. + */ + public PayoutIntent cancel(String id, RequestOptions options) + throws StripeException, NotCancelableException { + String path = + String.format("/v2/money_management/payout_intents/%s/cancel", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, PayoutIntent.class); + } + /** + * Confirms a PayoutIntent in the {@code requires_action} state, transitioning it to {@code + * pending}. + */ + public PayoutIntent confirm(String id) throws StripeException, FxQuoteNeedsRefreshException { + return confirm(id, (RequestOptions) null); + } + /** + * Confirms a PayoutIntent in the {@code requires_action} state, transitioning it to {@code + * pending}. + */ + public PayoutIntent confirm(String id, RequestOptions options) + throws StripeException, FxQuoteNeedsRefreshException { + String path = + String.format( + "/v2/money_management/payout_intents/%s/confirm", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, PayoutIntent.class); + } + /** Refreshes the FX quote for a PayoutIntent. */ + public PayoutIntent refreshFxQuote(String id) throws StripeException { + return refreshFxQuote(id, (RequestOptions) null); + } + /** Refreshes the FX quote for a PayoutIntent. */ + public PayoutIntent refreshFxQuote(String id, RequestOptions options) throws StripeException { + String path = + String.format( + "/v2/money_management/payout_intents/%s/refresh_fx_quote", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, PayoutIntent.class); + } + /** Refreshes the recipient verification for a PayoutIntent. */ + public PayoutIntent refreshRecipientVerification(String id) throws StripeException { + return refreshRecipientVerification(id, (RequestOptions) null); + } + /** Refreshes the recipient verification for a PayoutIntent. */ + public PayoutIntent refreshRecipientVerification(String id, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v2/money_management/payout_intents/%s/refresh_recipient_verification", + ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, PayoutIntent.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodService.java b/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodService.java new file mode 100644 index 000000000000..28f12fa1630f --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodService.java @@ -0,0 +1,113 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.CannotProceedException; +import com.stripe.exception.ControlledByAlternateResourceException; +import com.stripe.exception.InvalidPayoutMethodException; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.moneymanagement.PayoutMethod; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.PayoutMethodListParams; + +public final class PayoutMethodService extends ApiService { + public PayoutMethodService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** List objects that adhere to the PayoutMethod interface. */ + public StripeCollection list(PayoutMethodListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + /** List objects that adhere to the PayoutMethod interface. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((PayoutMethodListParams) null, options); + } + /** List objects that adhere to the PayoutMethod interface. */ + public StripeCollection list() throws StripeException { + return list((PayoutMethodListParams) null, (RequestOptions) null); + } + /** List objects that adhere to the PayoutMethod interface. */ + public StripeCollection list(PayoutMethodListParams params, RequestOptions options) + throws StripeException { + String path = "/v2/money_management/payout_methods"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Retrieve a PayoutMethod object. */ + public PayoutMethod retrieve(String id) throws StripeException, InvalidPayoutMethodException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieve a PayoutMethod object. */ + public PayoutMethod retrieve(String id, RequestOptions options) + throws StripeException, InvalidPayoutMethodException { + String path = + String.format("/v2/money_management/payout_methods/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, PayoutMethod.class); + } + /** + * Archive a {@code PayoutMethod}. Archiving prevents the Payout Method from being used for + * outbound payments or transfers and omits it from normal list results. To restore list + * visibility, use the unarchive + * endpoint. + */ + public PayoutMethod archive(String id) + throws StripeException, CannotProceedException, InvalidPayoutMethodException, + ControlledByAlternateResourceException { + return archive(id, (RequestOptions) null); + } + /** + * Archive a {@code PayoutMethod}. Archiving prevents the Payout Method from being used for + * outbound payments or transfers and omits it from normal list results. To restore list + * visibility, use the unarchive + * endpoint. + */ + public PayoutMethod archive(String id, RequestOptions options) + throws StripeException, CannotProceedException, InvalidPayoutMethodException, + ControlledByAlternateResourceException { + String path = + String.format( + "/v2/money_management/payout_methods/%s/archive", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, PayoutMethod.class); + } + /** + * Unarchive a {@code PayoutMethod}. Unarchiving restores the Payout Method to normal list results + * and clears only its archived state. It doesn't guarantee that the Payout Method can be used. + */ + public PayoutMethod unarchive(String id) + throws StripeException, InvalidPayoutMethodException, ControlledByAlternateResourceException { + return unarchive(id, (RequestOptions) null); + } + /** + * Unarchive a {@code PayoutMethod}. Unarchiving restores the Payout Method to normal list results + * and clears only its archived state. It doesn't guarantee that the Payout Method can be used. + */ + public PayoutMethod unarchive(String id, RequestOptions options) + throws StripeException, InvalidPayoutMethodException, ControlledByAlternateResourceException { + String path = + String.format( + "/v2/money_management/payout_methods/%s/unarchive", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, PayoutMethod.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodsBankAccountSpecService.java b/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodsBankAccountSpecService.java new file mode 100644 index 000000000000..5636e55a7aa1 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodsBankAccountSpecService.java @@ -0,0 +1,63 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.moneymanagement.PayoutMethodsBankAccountSpec; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.PayoutMethodsBankAccountSpecRetrieveParams; + +public final class PayoutMethodsBankAccountSpecService extends ApiService { + public PayoutMethodsBankAccountSpecService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Fetch the specifications for a set of countries to know which credential fields are required, + * the validations for each fields, and how to translate these country-specific fields to the + * generic fields in the PayoutMethodBankAccount type. + */ + public PayoutMethodsBankAccountSpec retrieve(PayoutMethodsBankAccountSpecRetrieveParams params) + throws StripeException { + return retrieve(params, (RequestOptions) null); + } + /** + * Fetch the specifications for a set of countries to know which credential fields are required, + * the validations for each fields, and how to translate these country-specific fields to the + * generic fields in the PayoutMethodBankAccount type. + */ + public PayoutMethodsBankAccountSpec retrieve(RequestOptions options) throws StripeException { + return retrieve((PayoutMethodsBankAccountSpecRetrieveParams) null, options); + } + /** + * Fetch the specifications for a set of countries to know which credential fields are required, + * the validations for each fields, and how to translate these country-specific fields to the + * generic fields in the PayoutMethodBankAccount type. + */ + public PayoutMethodsBankAccountSpec retrieve() throws StripeException { + return retrieve((PayoutMethodsBankAccountSpecRetrieveParams) null, (RequestOptions) null); + } + /** + * Fetch the specifications for a set of countries to know which credential fields are required, + * the validations for each fields, and how to translate these country-specific fields to the + * generic fields in the PayoutMethodBankAccount type. + */ + public PayoutMethodsBankAccountSpec retrieve( + PayoutMethodsBankAccountSpecRetrieveParams params, RequestOptions options) + throws StripeException { + String path = "/v2/money_management/payout_methods_bank_account_spec"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PayoutMethodsBankAccountSpec.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/ReceivedCreditService.java b/src/main/java/com/stripe/service/v2/moneymanagement/ReceivedCreditService.java new file mode 100644 index 000000000000..124c7e7c88df --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/ReceivedCreditService.java @@ -0,0 +1,60 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.moneymanagement.ReceivedCredit; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.ReceivedCreditListParams; + +public final class ReceivedCreditService extends ApiService { + public ReceivedCreditService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Retrieves a list of ReceivedCredits. */ + public StripeCollection list(ReceivedCreditListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** Retrieves a list of ReceivedCredits. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((ReceivedCreditListParams) null, options); + } + /** Retrieves a list of ReceivedCredits. */ + public StripeCollection list() throws StripeException { + return list((ReceivedCreditListParams) null, (RequestOptions) null); + } + /** Retrieves a list of ReceivedCredits. */ + public StripeCollection list( + ReceivedCreditListParams params, RequestOptions options) throws StripeException { + String path = "/v2/money_management/received_credits"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Retrieve a ReceivedCredit by ID. */ + public ReceivedCredit retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieve a ReceivedCredit by ID. */ + public ReceivedCredit retrieve(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/money_management/received_credits/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, ReceivedCredit.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/RecipientVerificationService.java b/src/main/java/com/stripe/service/v2/moneymanagement/RecipientVerificationService.java new file mode 100644 index 000000000000..cf22592745a0 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/RecipientVerificationService.java @@ -0,0 +1,76 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.moneymanagement.RecipientVerification; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.RecipientVerificationCreateParams; + +public final class RecipientVerificationService extends ApiService { + public RecipientVerificationService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Creates a RecipientVerification to verify the recipient you intend to send funds to. */ + public RecipientVerification create(RecipientVerificationCreateParams params) + throws StripeException { + return create(params, (RequestOptions) null); + } + /** Creates a RecipientVerification to verify the recipient you intend to send funds to. */ + public RecipientVerification create( + RecipientVerificationCreateParams params, RequestOptions options) throws StripeException { + String path = "/v2/money_management/recipient_verifications"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, RecipientVerification.class); + } + /** + * Retrieves the details of an existing RecipientVerification by passing the unique + * RecipientVerification ID. + */ + public RecipientVerification retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** + * Retrieves the details of an existing RecipientVerification by passing the unique + * RecipientVerification ID. + */ + public RecipientVerification retrieve(String id, RequestOptions options) throws StripeException { + String path = + String.format( + "/v2/money_management/recipient_verifications/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, RecipientVerification.class); + } + /** + * Acknowledges an existing RecipientVerification in the {@code awaiting_acknowledgement} state. + */ + public RecipientVerification acknowledge(String id) throws StripeException { + return acknowledge(id, (RequestOptions) null); + } + /** + * Acknowledges an existing RecipientVerification in the {@code awaiting_acknowledgement} state. + */ + public RecipientVerification acknowledge(String id, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v2/money_management/recipient_verifications/%s/acknowledge", + ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, RecipientVerification.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/TestHelpersService.java b/src/main/java/com/stripe/service/v2/moneymanagement/TestHelpersService.java new file mode 100644 index 000000000000..6282b62a8539 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/TestHelpersService.java @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class TestHelpersService extends ApiService { + public TestHelpersService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.v2.moneymanagement.testhelpers.FinancialAddressService + financialAddresses() { + return new com.stripe.service.v2.moneymanagement.testhelpers.FinancialAddressService( + this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/TransactionEntryService.java b/src/main/java/com/stripe/service/v2/moneymanagement/TransactionEntryService.java new file mode 100644 index 000000000000..22412f07c9d5 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/TransactionEntryService.java @@ -0,0 +1,60 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.moneymanagement.TransactionEntry; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.TransactionEntryListParams; + +public final class TransactionEntryService extends ApiService { + public TransactionEntryService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Returns a list of TransactionEntries that match the provided filters. */ + public StripeCollection list(TransactionEntryListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** Returns a list of TransactionEntries that match the provided filters. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((TransactionEntryListParams) null, options); + } + /** Returns a list of TransactionEntries that match the provided filters. */ + public StripeCollection list() throws StripeException { + return list((TransactionEntryListParams) null, (RequestOptions) null); + } + /** Returns a list of TransactionEntries that match the provided filters. */ + public StripeCollection list( + TransactionEntryListParams params, RequestOptions options) throws StripeException { + String path = "/v2/money_management/transaction_entries"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Retrieves the details of a TransactionEntry by ID. */ + public TransactionEntry retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieves the details of a TransactionEntry by ID. */ + public TransactionEntry retrieve(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/money_management/transaction_entries/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, TransactionEntry.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/TransactionService.java b/src/main/java/com/stripe/service/v2/moneymanagement/TransactionService.java new file mode 100644 index 000000000000..faca521ffd80 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/TransactionService.java @@ -0,0 +1,101 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.moneymanagement.Transaction; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.TransactionListParams; +import com.stripe.param.v2.moneymanagement.TransactionUpdateParams; + +public final class TransactionService extends ApiService { + public TransactionService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Returns a list of Transactions that match the provided filters. */ + public StripeCollection list(TransactionListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + /** Returns a list of Transactions that match the provided filters. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((TransactionListParams) null, options); + } + /** Returns a list of Transactions that match the provided filters. */ + public StripeCollection list() throws StripeException { + return list((TransactionListParams) null, (RequestOptions) null); + } + /** Returns a list of Transactions that match the provided filters. */ + public StripeCollection list(TransactionListParams params, RequestOptions options) + throws StripeException { + String path = "/v2/money_management/transactions"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Retrieves the details of a Transaction by ID. */ + public Transaction retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieves the details of a Transaction by ID. */ + public Transaction retrieve(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/money_management/transactions/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, Transaction.class); + } + /** Updates an existing Transaction. You can update its description and metadata. */ + public Transaction update(String id, TransactionUpdateParams params) throws StripeException { + return update(id, params, (RequestOptions) null); + } + /** Updates an existing Transaction. You can update its description and metadata. */ + public Transaction update(String id, RequestOptions options) throws StripeException { + return update(id, (TransactionUpdateParams) null, options); + } + /** Updates an existing Transaction. You can update its description and metadata. */ + public Transaction update(String id) throws StripeException { + return update(id, (TransactionUpdateParams) null, (RequestOptions) null); + } + /** Updates an existing Transaction. You can update its description and metadata. */ + public Transaction update(String id, TransactionUpdateParams params, RequestOptions options) + throws StripeException { + String path = + String.format("/v2/money_management/transactions/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Transaction.class); + } + /** Creates a fresh hosted URL for a Transaction's regulatory receipt. */ + public Transaction refreshRegulatoryReceipt(String id) throws StripeException { + return refreshRegulatoryReceipt(id, (RequestOptions) null); + } + /** Creates a fresh hosted URL for a Transaction's regulatory receipt. */ + public Transaction refreshRegulatoryReceipt(String id, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v2/money_management/transactions/%s/refresh_regulatory_receipt", + ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, Transaction.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/testhelpers/FinancialAddressService.java b/src/main/java/com/stripe/service/v2/moneymanagement/testhelpers/FinancialAddressService.java new file mode 100644 index 000000000000..e225eb71be3a --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/testhelpers/FinancialAddressService.java @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement.testhelpers; + +import com.stripe.exception.FeatureNotEnabledException; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.moneymanagement.FinancialAddressCreditSimulation; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.testhelpers.FinancialAddressCreditParams; + +public final class FinancialAddressService extends ApiService { + public FinancialAddressService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Simulate crediting a FinancialAddress in a Sandbox environment. This can be used to add virtual + * funds and increase your balance for testing. + */ + public FinancialAddressCreditSimulation credit(String id, FinancialAddressCreditParams params) + throws StripeException, FeatureNotEnabledException { + return credit(id, params, (RequestOptions) null); + } + /** + * Simulate crediting a FinancialAddress in a Sandbox environment. This can be used to add virtual + * funds and increase your balance for testing. + */ + public FinancialAddressCreditSimulation credit( + String id, FinancialAddressCreditParams params, RequestOptions options) + throws StripeException, FeatureNotEnabledException { + String path = + String.format( + "/v2/money_management/test_helpers/financial_addresses/%s/credit", + ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, FinancialAddressCreditSimulation.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/testhelpers/MoneyManagementService.java b/src/main/java/com/stripe/service/v2/testhelpers/MoneyManagementService.java new file mode 100644 index 000000000000..d0bd916960ab --- /dev/null +++ b/src/main/java/com/stripe/service/v2/testhelpers/MoneyManagementService.java @@ -0,0 +1,45 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.testhelpers; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.moneymanagement.RecipientVerification; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.testhelpers.MoneyManagementRecipientVerificationsParams; + +public final class MoneyManagementService extends ApiService { + public MoneyManagementService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Creates a RecipientVerification with a specified match result for testing purposes in a Sandbox + * environment. + */ + public RecipientVerification recipientVerifications( + MoneyManagementRecipientVerificationsParams params) throws StripeException { + return recipientVerifications(params, (RequestOptions) null); + } + /** + * Creates a RecipientVerification with a specified match result for testing purposes in a Sandbox + * environment. + */ + public RecipientVerification recipientVerifications( + MoneyManagementRecipientVerificationsParams params, RequestOptions options) + throws StripeException { + String path = "/v2/test_helpers/money_management/recipient_verifications"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, RecipientVerification.class); + } +} diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 805c28da9ba5..052a4fead91d 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -25243,6 +25243,2055 @@ public void testV2CoreEventDestinationPost5Services() throws StripeException { null); } + @Test + public void testV2CoreVaultGbBankAccountGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/vault/gb_bank_accounts", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.core.vault.GbBankAccount>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"restricted\":true,\"supported_currencies\":[\"supported_currencies\"]}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.GbBankAccountListParams params = + com.stripe.param.v2.core.vault.GbBankAccountListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().core().vault().gbBankAccounts().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/vault/gb_bank_accounts", + params.toMap(), + null); + } + + @Test + public void testV2CoreVaultGbBankAccountPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts", + null, + null, + com.stripe.model.v2.core.vault.GbBankAccount.class, + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"restricted\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.GbBankAccountCreateParams params = + com.stripe.param.v2.core.vault.GbBankAccountCreateParams.builder() + .setCurrency("usd") + .build(); + + com.stripe.model.v2.core.vault.GbBankAccount gbBankAccount = + client.v2().core().vault().gbBankAccounts().create(params); + assertNotNull(gbBankAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts", + params.toMap(), + null); + } + + @Test + public void testV2CoreVaultGbBankAccountGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/vault/gb_bank_accounts/id_123", + null, + null, + com.stripe.model.v2.core.vault.GbBankAccount.class, + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"restricted\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.vault.GbBankAccount gbBankAccount = + client.v2().core().vault().gbBankAccounts().retrieve("id_123"); + assertNotNull(gbBankAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/vault/gb_bank_accounts/id_123", + null, + null); + } + + @Test + public void testV2CoreVaultGbBankAccountPost2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts/id_123/archive", + null, + null, + com.stripe.model.v2.core.vault.GbBankAccount.class, + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"restricted\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.vault.GbBankAccount gbBankAccount = + client.v2().core().vault().gbBankAccounts().archive("id_123"); + assertNotNull(gbBankAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts/id_123/archive", + null, + null); + } + + @Test + public void testV2CoreVaultGbBankAccountPost3Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts/id_123/unarchive", + null, + null, + com.stripe.model.v2.core.vault.GbBankAccount.class, + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"restricted\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.vault.GbBankAccount gbBankAccount = + client.v2().core().vault().gbBankAccounts().unarchive("id_123"); + assertNotNull(gbBankAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts/id_123/unarchive", + null, + null); + } + + @Test + public void testV2CoreVaultUsBankAccountGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/vault/us_bank_accounts", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.core.vault.UsBankAccount>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"restricted\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.UsBankAccountListParams params = + com.stripe.param.v2.core.vault.UsBankAccountListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().core().vault().usBankAccounts().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/vault/us_bank_accounts", + params.toMap(), + null); + } + + @Test + public void testV2CoreVaultUsBankAccountPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts", + null, + null, + com.stripe.model.v2.core.vault.UsBankAccount.class, + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"restricted\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.UsBankAccountCreateParams params = + com.stripe.param.v2.core.vault.UsBankAccountCreateParams.builder() + .setAccountNumber("account_number") + .setCurrency("usd") + .build(); + + com.stripe.model.v2.core.vault.UsBankAccount usBankAccount = + client.v2().core().vault().usBankAccounts().create(params); + assertNotNull(usBankAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts", + params.toMap(), + null); + } + + @Test + public void testV2CoreVaultUsBankAccountGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/vault/us_bank_accounts/id_123", + null, + null, + com.stripe.model.v2.core.vault.UsBankAccount.class, + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"restricted\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.vault.UsBankAccount usBankAccount = + client.v2().core().vault().usBankAccounts().retrieve("id_123"); + assertNotNull(usBankAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/vault/us_bank_accounts/id_123", + null, + null); + } + + @Test + public void testV2CoreVaultUsBankAccountPost2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123", + null, + null, + com.stripe.model.v2.core.vault.UsBankAccount.class, + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"restricted\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.UsBankAccountUpdateParams params = + com.stripe.param.v2.core.vault.UsBankAccountUpdateParams.builder().build(); + + com.stripe.model.v2.core.vault.UsBankAccount usBankAccount = + client.v2().core().vault().usBankAccounts().update("id_123", params); + assertNotNull(usBankAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123", + params.toMap(), + null); + } + + @Test + public void testV2CoreVaultUsBankAccountPost3Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/archive", + null, + null, + com.stripe.model.v2.core.vault.UsBankAccount.class, + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"restricted\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.vault.UsBankAccount usBankAccount = + client.v2().core().vault().usBankAccounts().archive("id_123"); + assertNotNull(usBankAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/archive", + null, + null); + } + + @Test + public void testV2CoreVaultUsBankAccountPost4Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + null, + null, + com.stripe.model.v2.core.vault.UsBankAccount.class, + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"restricted\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.UsBankAccountConfirmMicrodepositsParams params = + com.stripe.param.v2.core.vault.UsBankAccountConfirmMicrodepositsParams.builder().build(); + + com.stripe.model.v2.core.vault.UsBankAccount usBankAccount = + client.v2().core().vault().usBankAccounts().confirmMicrodeposits("id_123", params); + assertNotNull(usBankAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + params.toMap(), + null); + } + + @Test + public void testV2CoreVaultUsBankAccountPost5Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/send_microdeposits", + null, + null, + com.stripe.model.v2.core.vault.UsBankAccount.class, + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"restricted\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.vault.UsBankAccount usBankAccount = + client.v2().core().vault().usBankAccounts().sendMicrodeposits("id_123"); + assertNotNull(usBankAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/send_microdeposits", + null, + null); + } + + @Test + public void testV2CoreVaultUsBankAccountPost6Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/unarchive", + null, + null, + com.stripe.model.v2.core.vault.UsBankAccount.class, + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"restricted\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.vault.UsBankAccount usBankAccount = + client.v2().core().vault().usBankAccounts().unarchive("id_123"); + assertNotNull(usBankAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/unarchive", + null, + null); + } + + @Test + public void testV2MoneyManagementAdjustmentGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/adjustments", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.Adjustment>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.money_management.adjustment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.AdjustmentListParams params = + com.stripe.param.v2.moneymanagement.AdjustmentListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().adjustments().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/adjustments", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementAdjustmentGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/adjustments/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.Adjustment.class, + "{\"object\":\"v2.money_management.adjustment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.Adjustment adjustment = + client.v2().moneyManagement().adjustments().retrieve("id_123"); + assertNotNull(adjustment); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/adjustments/id_123", + null, + null); + } + + @Test + public void testV2MoneyManagementFinancialAccountGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/financial_accounts", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.FinancialAccount>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.money_management.financial_account\",\"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\",\"livemode\":true,\"status\":\"closed\",\"type\":\"other\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.FinancialAccountListParams params = + com.stripe.param.v2.moneymanagement.FinancialAccountListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().financialAccounts().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/financial_accounts", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementFinancialAccountGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/financial_accounts/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.FinancialAccount.class, + "{\"object\":\"v2.money_management.financial_account\",\"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\",\"livemode\":true,\"status\":\"closed\",\"type\":\"other\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.FinancialAccountRetrieveParams params = + com.stripe.param.v2.moneymanagement.FinancialAccountRetrieveParams.builder().build(); + + com.stripe.model.v2.moneymanagement.FinancialAccount financialAccount = + client.v2().moneyManagement().financialAccounts().retrieve("id_123", params); + assertNotNull(financialAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/financial_accounts/id_123", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementFinancialAccountPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/financial_accounts/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.FinancialAccount.class, + "{\"object\":\"v2.money_management.financial_account\",\"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\",\"livemode\":true,\"status\":\"closed\",\"type\":\"other\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.FinancialAccountUpdateParams params = + com.stripe.param.v2.moneymanagement.FinancialAccountUpdateParams.builder().build(); + + com.stripe.model.v2.moneymanagement.FinancialAccount financialAccount = + client.v2().moneyManagement().financialAccounts().update("id_123", params); + assertNotNull(financialAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/financial_accounts/id_123", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementFinancialAddressGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/financial_addresses", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.FinancialAddress>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"settlement_currency\":\"usd\",\"status\":\"failed\",\"type\":\"bank_account\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.FinancialAddressListParams params = + com.stripe.param.v2.moneymanagement.FinancialAddressListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().financialAddresses().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/financial_addresses", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementFinancialAddressPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/financial_addresses", + null, + null, + com.stripe.model.v2.moneymanagement.FinancialAddress.class, + "{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"settlement_currency\":\"usd\",\"status\":\"failed\",\"type\":\"bank_account\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams params = + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams.builder() + .setFinancialAccount("financial_account") + .setType( + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams.Type.BANK_ACCOUNT) + .build(); + + com.stripe.model.v2.moneymanagement.FinancialAddress financialAddress = + client.v2().moneyManagement().financialAddresses().create(params); + assertNotNull(financialAddress); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/financial_addresses", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementFinancialAddressGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/financial_addresses/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.FinancialAddress.class, + "{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"settlement_currency\":\"usd\",\"status\":\"failed\",\"type\":\"bank_account\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.FinancialAddress financialAddress = + client.v2().moneyManagement().financialAddresses().retrieve("id_123"); + assertNotNull(financialAddress); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/financial_addresses/id_123", + null, + null); + } + + @Test + public void testV2MoneyManagementInboundTransferGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/inbound_transfers", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.InboundTransfer>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.money_management.inbound_transfer\",\"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\",\"livemode\":true,\"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\",\"type\":\"bank_debit_failed\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.InboundTransferListParams params = + com.stripe.param.v2.moneymanagement.InboundTransferListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().inboundTransfers().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/inbound_transfers", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementInboundTransferPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/inbound_transfers", + null, + null, + com.stripe.model.v2.moneymanagement.InboundTransfer.class, + "{\"object\":\"v2.money_management.inbound_transfer\",\"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\",\"livemode\":true,\"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\",\"type\":\"bank_debit_failed\"}]}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.InboundTransferCreateParams params = + com.stripe.param.v2.moneymanagement.InboundTransferCreateParams.builder() + .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setFrom( + com.stripe.param.v2.moneymanagement.InboundTransferCreateParams.From.builder() + .setCurrency("usd") + .setPaymentMethod("payment_method") + .build()) + .setTo( + com.stripe.param.v2.moneymanagement.InboundTransferCreateParams.To.builder() + .setCurrency("usd") + .setFinancialAccount("financial_account") + .build()) + .build(); + + com.stripe.model.v2.moneymanagement.InboundTransfer inboundTransfer = + client.v2().moneyManagement().inboundTransfers().create(params); + assertNotNull(inboundTransfer); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/inbound_transfers", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementInboundTransferGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/inbound_transfers/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.InboundTransfer.class, + "{\"object\":\"v2.money_management.inbound_transfer\",\"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\",\"livemode\":true,\"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\",\"type\":\"bank_debit_failed\"}]}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.InboundTransfer inboundTransfer = + client.v2().moneyManagement().inboundTransfers().retrieve("id_123"); + assertNotNull(inboundTransfer); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/inbound_transfers/id_123", + null, + null); + } + + @Test + public void testV2MoneyManagementOutboundPaymentGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_payments", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.OutboundPayment>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.money_management.outbound_payment\",\"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\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"recipient\":\"recipient\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.OutboundPaymentListParams params = + com.stripe.param.v2.moneymanagement.OutboundPaymentListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().outboundPayments().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_payments", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementOutboundPaymentPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments", + null, + null, + com.stripe.model.v2.moneymanagement.OutboundPayment.class, + "{\"object\":\"v2.money_management.outbound_payment\",\"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\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"recipient\":\"recipient\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() + .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setFrom( + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() + .setCurrency("usd") + .setFinancialAccount("financial_account") + .build()) + .setTo( + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.To.builder() + .setCurrency("usd") + .setPayoutMethod("payout_method") + .setPayoutMethodOptions( + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.To + .PayoutMethodOptions.builder() + .setBankAccount( + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.To + .PayoutMethodOptions.BankAccount.builder() + .setPreferredNetworkOptions( + com.stripe.param.v2.moneymanagement + .OutboundPaymentCreateParams.To.PayoutMethodOptions + .BankAccount.PreferredNetworkOptions.builder() + .setAch( + com.stripe.param.v2.moneymanagement + .OutboundPaymentCreateParams.To + .PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach.builder() + .setSubmission( + com.stripe.param.v2.moneymanagement + .OutboundPaymentCreateParams.To + .PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach.Submission + .NEXT_DAY) + .setTransactionPurpose( + com.stripe.param.v2.moneymanagement + .OutboundPaymentCreateParams.To + .PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach + .TransactionPurpose.PAYROLL) + .build()) + .build()) + .addPreferredNetwork( + com.stripe.param.v2.moneymanagement + .OutboundPaymentCreateParams.To.PayoutMethodOptions + .BankAccount.PreferredNetwork.RTP) + .build()) + .build()) + .setRecipient("recipient") + .build()) + .build(); + + com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = + client.v2().moneyManagement().outboundPayments().create(params); + assertNotNull(outboundPayment); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementOutboundPaymentGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_payments/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.OutboundPayment.class, + "{\"object\":\"v2.money_management.outbound_payment\",\"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\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"recipient\":\"recipient\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = + client.v2().moneyManagement().outboundPayments().retrieve("id_123"); + assertNotNull(outboundPayment); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_payments/id_123", + null, + null); + } + + @Test + public void testV2MoneyManagementOutboundPaymentPost2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments/id_123/cancel", + null, + null, + com.stripe.model.v2.moneymanagement.OutboundPayment.class, + "{\"object\":\"v2.money_management.outbound_payment\",\"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\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"recipient\":\"recipient\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = + client.v2().moneyManagement().outboundPayments().cancel("id_123"); + assertNotNull(outboundPayment); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments/id_123/cancel", + null, + null); + } + + @Test + public void testV2MoneyManagementOutboundSetupIntentGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_setup_intents", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.OutboundSetupIntent>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.OutboundSetupIntentListParams params = + com.stripe.param.v2.moneymanagement.OutboundSetupIntentListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().outboundSetupIntents().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_setup_intents", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementOutboundSetupIntentPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_setup_intents", + null, + null, + com.stripe.model.v2.moneymanagement.OutboundSetupIntent.class, + "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.OutboundSetupIntentCreateParams params = + com.stripe.param.v2.moneymanagement.OutboundSetupIntentCreateParams.builder().build(); + + com.stripe.model.v2.moneymanagement.OutboundSetupIntent outboundSetupIntent = + client.v2().moneyManagement().outboundSetupIntents().create(params); + assertNotNull(outboundSetupIntent); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_setup_intents", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementOutboundSetupIntentGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_setup_intents/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.OutboundSetupIntent.class, + "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.OutboundSetupIntent outboundSetupIntent = + client.v2().moneyManagement().outboundSetupIntents().retrieve("id_123"); + assertNotNull(outboundSetupIntent); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_setup_intents/id_123", + null, + null); + } + + @Test + public void testV2MoneyManagementOutboundSetupIntentPost2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_setup_intents/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.OutboundSetupIntent.class, + "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.OutboundSetupIntentUpdateParams params = + com.stripe.param.v2.moneymanagement.OutboundSetupIntentUpdateParams.builder().build(); + + com.stripe.model.v2.moneymanagement.OutboundSetupIntent outboundSetupIntent = + client.v2().moneyManagement().outboundSetupIntents().update("id_123", params); + assertNotNull(outboundSetupIntent); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_setup_intents/id_123", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementOutboundSetupIntentPost3Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_setup_intents/id_123/cancel", + null, + null, + com.stripe.model.v2.moneymanagement.OutboundSetupIntent.class, + "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.OutboundSetupIntent outboundSetupIntent = + client.v2().moneyManagement().outboundSetupIntents().cancel("id_123"); + assertNotNull(outboundSetupIntent); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_setup_intents/id_123/cancel", + null, + null); + } + + @Test + public void testV2MoneyManagementPayoutIntentGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/payout_intents", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.PayoutIntent>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.money_management.payout_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"confirmation_method\":\"manual\",\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"currency\":\"usd\",\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"to\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.PayoutIntentListParams params = + com.stripe.param.v2.moneymanagement.PayoutIntentListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().payoutIntents().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/payout_intents", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementPayoutIntentPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents", + null, + null, + com.stripe.model.v2.moneymanagement.PayoutIntent.class, + "{\"object\":\"v2.money_management.payout_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"confirmation_method\":\"manual\",\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"currency\":\"usd\",\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"to\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.PayoutIntentCreateParams params = + com.stripe.param.v2.moneymanagement.PayoutIntentCreateParams.builder() + .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setFrom( + com.stripe.param.v2.moneymanagement.PayoutIntentCreateParams.From.builder() + .setCurrency("usd") + .setFinancialAccount("financial_account") + .build()) + .setTo( + com.stripe.param.v2.moneymanagement.PayoutIntentCreateParams.To.builder() + .setCurrency("usd") + .setPayoutMethod("payout_method") + .setPayoutMethodOptions( + com.stripe.param.v2.moneymanagement.PayoutIntentCreateParams.To + .PayoutMethodOptions.builder() + .setBankAccount( + com.stripe.param.v2.moneymanagement.PayoutIntentCreateParams.To + .PayoutMethodOptions.BankAccount.builder() + .setPreferredNetworkOptions( + com.stripe.param.v2.moneymanagement.PayoutIntentCreateParams + .To.PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.builder() + .setAch( + com.stripe.param.v2.moneymanagement + .PayoutIntentCreateParams.To.PayoutMethodOptions + .BankAccount.PreferredNetworkOptions.Ach + .builder() + .setSubmission( + com.stripe.param.v2.moneymanagement + .PayoutIntentCreateParams.To + .PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach.Submission + .NEXT_DAY) + .setTransactionPurpose( + com.stripe.param.v2.moneymanagement + .PayoutIntentCreateParams.To + .PayoutMethodOptions.BankAccount + .PreferredNetworkOptions.Ach + .TransactionPurpose.PAYROLL) + .build()) + .build()) + .addPreferredNetwork( + com.stripe.param.v2.moneymanagement.PayoutIntentCreateParams + .To.PayoutMethodOptions.BankAccount.PreferredNetwork + .RTP) + .build()) + .build()) + .setRecipient("recipient") + .build()) + .build(); + + com.stripe.model.v2.moneymanagement.PayoutIntent payoutIntent = + client.v2().moneyManagement().payoutIntents().create(params); + assertNotNull(payoutIntent); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementPayoutIntentGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/payout_intents/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.PayoutIntent.class, + "{\"object\":\"v2.money_management.payout_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"confirmation_method\":\"manual\",\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"currency\":\"usd\",\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"to\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.PayoutIntent payoutIntent = + client.v2().moneyManagement().payoutIntents().retrieve("id_123"); + assertNotNull(payoutIntent); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/payout_intents/id_123", + null, + null); + } + + @Test + public void testV2MoneyManagementPayoutIntentPost2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.PayoutIntent.class, + "{\"object\":\"v2.money_management.payout_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"confirmation_method\":\"manual\",\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"currency\":\"usd\",\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"to\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.PayoutIntentUpdateParams params = + com.stripe.param.v2.moneymanagement.PayoutIntentUpdateParams.builder().build(); + + com.stripe.model.v2.moneymanagement.PayoutIntent payoutIntent = + client.v2().moneyManagement().payoutIntents().update("id_123", params); + assertNotNull(payoutIntent); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents/id_123", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementPayoutIntentPost3Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents/id_123/cancel", + null, + null, + com.stripe.model.v2.moneymanagement.PayoutIntent.class, + "{\"object\":\"v2.money_management.payout_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"confirmation_method\":\"manual\",\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"currency\":\"usd\",\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"to\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.PayoutIntent payoutIntent = + client.v2().moneyManagement().payoutIntents().cancel("id_123"); + assertNotNull(payoutIntent); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents/id_123/cancel", + null, + null); + } + + @Test + public void testV2MoneyManagementPayoutIntentPost4Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents/id_123/confirm", + null, + null, + com.stripe.model.v2.moneymanagement.PayoutIntent.class, + "{\"object\":\"v2.money_management.payout_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"confirmation_method\":\"manual\",\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"currency\":\"usd\",\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"to\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.PayoutIntent payoutIntent = + client.v2().moneyManagement().payoutIntents().confirm("id_123"); + assertNotNull(payoutIntent); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents/id_123/confirm", + null, + null); + } + + @Test + public void testV2MoneyManagementPayoutIntentPost5Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents/id_123/refresh_fx_quote", + null, + null, + com.stripe.model.v2.moneymanagement.PayoutIntent.class, + "{\"object\":\"v2.money_management.payout_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"confirmation_method\":\"manual\",\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"currency\":\"usd\",\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"to\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.PayoutIntent payoutIntent = + client.v2().moneyManagement().payoutIntents().refreshFxQuote("id_123"); + assertNotNull(payoutIntent); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents/id_123/refresh_fx_quote", + null, + null); + } + + @Test + public void testV2MoneyManagementPayoutIntentPost6Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents/id_123/refresh_recipient_verification", + null, + null, + com.stripe.model.v2.moneymanagement.PayoutIntent.class, + "{\"object\":\"v2.money_management.payout_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"confirmation_method\":\"manual\",\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"currency\":\"usd\",\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"to\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.PayoutIntent payoutIntent = + client.v2().moneyManagement().payoutIntents().refreshRecipientVerification("id_123"); + assertNotNull(payoutIntent); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents/id_123/refresh_recipient_verification", + null, + null); + } + + @Test + public void testV2MoneyManagementPayoutMethodGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/payout_methods", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.PayoutMethod>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.money_management.payout_method\",\"archived\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"invalid\",\"transfers\":\"invalid\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.PayoutMethodListParams params = + com.stripe.param.v2.moneymanagement.PayoutMethodListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().payoutMethods().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/payout_methods", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementPayoutMethodGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/payout_methods/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.PayoutMethod.class, + "{\"object\":\"v2.money_management.payout_method\",\"archived\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"invalid\",\"transfers\":\"invalid\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.PayoutMethod payoutMethod = + client.v2().moneyManagement().payoutMethods().retrieve("id_123"); + assertNotNull(payoutMethod); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/payout_methods/id_123", + null, + null); + } + + @Test + public void testV2MoneyManagementPayoutMethodPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_methods/id_123/archive", + null, + null, + com.stripe.model.v2.moneymanagement.PayoutMethod.class, + "{\"object\":\"v2.money_management.payout_method\",\"archived\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"invalid\",\"transfers\":\"invalid\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.PayoutMethod payoutMethod = + client.v2().moneyManagement().payoutMethods().archive("id_123"); + assertNotNull(payoutMethod); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_methods/id_123/archive", + null, + null); + } + + @Test + public void testV2MoneyManagementPayoutMethodPost2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_methods/id_123/unarchive", + null, + null, + com.stripe.model.v2.moneymanagement.PayoutMethod.class, + "{\"object\":\"v2.money_management.payout_method\",\"archived\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"invalid\",\"transfers\":\"invalid\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.PayoutMethod payoutMethod = + client.v2().moneyManagement().payoutMethods().unarchive("id_123"); + assertNotNull(payoutMethod); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_methods/id_123/unarchive", + null, + null); + } + + @Test + public void testV2MoneyManagementPayoutMethodsBankAccountSpecGetServices() + throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/payout_methods_bank_account_spec", + null, + null, + com.stripe.model.v2.moneymanagement.PayoutMethodsBankAccountSpec.class, + "{\"object\":\"v2.money_management.payout_methods_bank_account_spec\",\"countries\":{\"key\":{\"fields\":[{\"local_name\":\"local_name\",\"local_name_human\":{\"content\":\"content\",\"localization_key\":\"localization_key\"},\"max_length\":1111390753,\"min_length\":711577229,\"placeholder\":\"placeholder\",\"stripe_name\":\"stripe_name\",\"validation_regex\":\"validation_regex\"}]}},\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.PayoutMethodsBankAccountSpecRetrieveParams params = + com.stripe.param.v2.moneymanagement.PayoutMethodsBankAccountSpecRetrieveParams.builder() + .build(); + + com.stripe.model.v2.moneymanagement.PayoutMethodsBankAccountSpec payoutMethodsBankAccountSpec = + client.v2().moneyManagement().payoutMethodsBankAccountSpec().retrieve(params); + assertNotNull(payoutMethodsBankAccountSpec); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/payout_methods_bank_account_spec", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementReceivedCreditGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/received_credits", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.ReceivedCredit>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"amount_received\":{\"currency\":\"USD\",\"value\":60},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"returned\",\"type\":\"balance_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.ReceivedCreditListParams params = + com.stripe.param.v2.moneymanagement.ReceivedCreditListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().receivedCredits().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/received_credits", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementReceivedCreditGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/received_credits/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.ReceivedCredit.class, + "{\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"amount_received\":{\"currency\":\"USD\",\"value\":60},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"returned\",\"type\":\"balance_transfer\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.ReceivedCredit receivedCredit = + client.v2().moneyManagement().receivedCredits().retrieve("id_123"); + assertNotNull(receivedCredit); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/received_credits/id_123", + null, + null); + } + + @Test + public void testV2MoneyManagementRecipientVerificationPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/recipient_verifications", + null, + null, + com.stripe.model.v2.moneymanagement.RecipientVerification.class, + "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"payout_method\":\"payout_method\",\"status\":\"acknowledged\",\"verification_type\":\"confirmation_of_payee\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.RecipientVerificationCreateParams params = + com.stripe.param.v2.moneymanagement.RecipientVerificationCreateParams.builder() + .setPayoutMethod("payout_method") + .build(); + + com.stripe.model.v2.moneymanagement.RecipientVerification recipientVerification = + client.v2().moneyManagement().recipientVerifications().create(params); + assertNotNull(recipientVerification); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/recipient_verifications", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementRecipientVerificationGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/recipient_verifications/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.RecipientVerification.class, + "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"payout_method\":\"payout_method\",\"status\":\"acknowledged\",\"verification_type\":\"confirmation_of_payee\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.RecipientVerification recipientVerification = + client.v2().moneyManagement().recipientVerifications().retrieve("id_123"); + assertNotNull(recipientVerification); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/recipient_verifications/id_123", + null, + null); + } + + @Test + public void testV2MoneyManagementRecipientVerificationPost2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/recipient_verifications/id_123/acknowledge", + null, + null, + com.stripe.model.v2.moneymanagement.RecipientVerification.class, + "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"payout_method\":\"payout_method\",\"status\":\"acknowledged\",\"verification_type\":\"confirmation_of_payee\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.RecipientVerification recipientVerification = + client.v2().moneyManagement().recipientVerifications().acknowledge("id_123"); + assertNotNull(recipientVerification); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/recipient_verifications/id_123/acknowledge", + null, + null); + } + + @Test + public void testV2MoneyManagementTestHelpersFinancialAddressPostServices() + throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/test_helpers/financial_addresses/id_123/credit", + null, + null, + com.stripe.model.v2.moneymanagement.FinancialAddressCreditSimulation.class, + "{\"object\":\"v2.money_management.financial_address_credit_simulation\",\"livemode\":true,\"status\":\"status\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.testhelpers.FinancialAddressCreditParams params = + com.stripe.param.v2.moneymanagement.testhelpers.FinancialAddressCreditParams.builder() + .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setNetwork( + com.stripe.param.v2.moneymanagement.testhelpers.FinancialAddressCreditParams.Network + .FEDWIRE) + .build(); + + com.stripe.model.v2.moneymanagement.FinancialAddressCreditSimulation + financialAddressCreditSimulation = + client + .v2() + .moneyManagement() + .testHelpers() + .financialAddresses() + .credit("id_123", params); + assertNotNull(financialAddressCreditSimulation); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/test_helpers/financial_addresses/id_123/credit", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementTransactionGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/transactions", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.Transaction>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.money_management.transaction\",\"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\":\"stripe_fee\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"regulatory_receipt\":{\"status\":\"pending\"},\"status\":\"pending\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.TransactionListParams params = + com.stripe.param.v2.moneymanagement.TransactionListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().transactions().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/transactions", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementTransactionGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/transactions/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.Transaction.class, + "{\"object\":\"v2.money_management.transaction\",\"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\":\"stripe_fee\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"regulatory_receipt\":{\"status\":\"pending\"},\"status\":\"pending\",\"status_transitions\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.Transaction transaction = + client.v2().moneyManagement().transactions().retrieve("id_123"); + assertNotNull(transaction); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/transactions/id_123", + null, + null); + } + + @Test + public void testV2MoneyManagementTransactionPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/transactions/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.Transaction.class, + "{\"object\":\"v2.money_management.transaction\",\"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\":\"stripe_fee\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"regulatory_receipt\":{\"status\":\"pending\"},\"status\":\"pending\",\"status_transitions\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.TransactionUpdateParams params = + com.stripe.param.v2.moneymanagement.TransactionUpdateParams.builder().build(); + + com.stripe.model.v2.moneymanagement.Transaction transaction = + client.v2().moneyManagement().transactions().update("id_123", params); + assertNotNull(transaction); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/transactions/id_123", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementTransactionPost2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/transactions/id_123/refresh_regulatory_receipt", + null, + null, + com.stripe.model.v2.moneymanagement.Transaction.class, + "{\"object\":\"v2.money_management.transaction\",\"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\":\"stripe_fee\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"regulatory_receipt\":{\"status\":\"pending\"},\"status\":\"pending\",\"status_transitions\":{}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.Transaction transaction = + client.v2().moneyManagement().transactions().refreshRegulatoryReceipt("id_123"); + assertNotNull(transaction); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/transactions/id_123/refresh_regulatory_receipt", + null, + null); + } + + @Test + public void testV2MoneyManagementTransactionEntryGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/transaction_entries", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.TransactionEntry>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.money_management.transaction_entry\",\"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\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"stripe_fee\",\"financial_account\":\"financial_account\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.TransactionEntryListParams params = + com.stripe.param.v2.moneymanagement.TransactionEntryListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().transactionEntries().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/transaction_entries", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementTransactionEntryGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/transaction_entries/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.TransactionEntry.class, + "{\"object\":\"v2.money_management.transaction_entry\",\"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\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"stripe_fee\",\"financial_account\":\"financial_account\"}}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.TransactionEntry transactionEntry = + client.v2().moneyManagement().transactionEntries().retrieve("id_123"); + assertNotNull(transactionEntry); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/transaction_entries/id_123", + null, + null); + } + + @Test + public void testV2TestHelpersMoneyManagementPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/test_helpers/money_management/recipient_verifications", + null, + null, + com.stripe.model.v2.moneymanagement.RecipientVerification.class, + "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"payout_method\":\"payout_method\",\"status\":\"acknowledged\",\"verification_type\":\"confirmation_of_payee\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.testhelpers.MoneyManagementRecipientVerificationsParams params = + com.stripe.param.v2.testhelpers.MoneyManagementRecipientVerificationsParams.builder() + .setMatchResult( + com.stripe.param.v2.testhelpers.MoneyManagementRecipientVerificationsParams + .MatchResult.UNAVAILABLE) + .setPayoutMethod("payout_method") + .build(); + + com.stripe.model.v2.moneymanagement.RecipientVerification recipientVerification = + client.v2().testHelpers().moneyManagement().recipientVerifications(params); + assertNotNull(recipientVerification); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/test_helpers/money_management/recipient_verifications", + params.toMap(), + null); + } + + @Test + public void testAlreadyCanceledErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments/id_123/cancel", + null, + null, + "{\"error\":{\"type\":\"already_canceled\",\"code\":\"outbound_payment_already_canceled\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + try { + client.v2().moneyManagement().outboundPayments().cancel("id_123"); + } catch (AlreadyCanceledException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments/id_123/cancel", + null, + null); + } + + @Test + public void testBlockedByStripeErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts", + null, + null, + "{\"error\":{\"type\":\"blocked_by_stripe\",\"code\":\"blocked_gb_bank_account\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.GbBankAccountCreateParams params = + com.stripe.param.v2.core.vault.GbBankAccountCreateParams.builder() + .setCurrency("usd") + .build(); + + try { + client.v2().core().vault().gbBankAccounts().create(params); + } catch (BlockedByStripeException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts", + params.toMap(), + null); + } + + @Test + public void testCannotProceedErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts", + null, + null, + "{\"error\":{\"type\":\"cannot_proceed\",\"code\":\"default_gb_bank_account_cannot_be_archived\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.GbBankAccountCreateParams params = + com.stripe.param.v2.core.vault.GbBankAccountCreateParams.builder() + .setCurrency("usd") + .build(); + + try { + client.v2().core().vault().gbBankAccounts().create(params); + } catch (CannotProceedException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts", + params.toMap(), + null); + } + + @Test + public void testCapabilityNotEnabledErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments", + null, + null, + "{\"error\":{\"type\":\"capability_not_enabled\",\"code\":\"outbound_flow_from_closed_financial_account_not_supported\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() + .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setFrom( + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() + .setCurrency("usd") + .setFinancialAccount("financial_account") + .build()) + .setTo( + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.To.builder() + .setRecipient("recipient") + .build()) + .build(); + + try { + client.v2().moneyManagement().outboundPayments().create(params); + } catch (CapabilityNotEnabledException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments", + params.toMap(), + null); + } + + @Test + public void testControlledByAlternateResourceErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts/id_123/archive", + null, + null, + "{\"error\":{\"type\":\"controlled_by_alternate_resource\",\"code\":\"gb_bank_account_cannot_be_archived\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + try { + client.v2().core().vault().gbBankAccounts().archive("id_123"); + } catch (ControlledByAlternateResourceException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts/id_123/archive", + null, + null); + } + + @Test + public void testFeatureNotEnabledErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/financial_addresses", + null, + null, + "{\"error\":{\"type\":\"feature_not_enabled\",\"code\":\"recipient_feature_not_active\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams params = + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams.builder() + .setFinancialAccount("financial_account") + .setType( + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams.Type.BANK_ACCOUNT) + .build(); + + try { + client.v2().moneyManagement().financialAddresses().create(params); + } catch (FeatureNotEnabledException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/financial_addresses", + params.toMap(), + null); + } + + @Test + public void testFinancialAccountNotOpenErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/financial_addresses", + null, + null, + "{\"error\":{\"type\":\"financial_account_not_open\",\"code\":\"financial_account_not_in_open_status\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams params = + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams.builder() + .setFinancialAccount("financial_account") + .setType( + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams.Type.BANK_ACCOUNT) + .build(); + + try { + client.v2().moneyManagement().financialAddresses().create(params); + } catch (FinancialAccountNotOpenException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/financial_addresses", + params.toMap(), + null); + } + + @Test + public void testFxQuoteNeedsRefreshErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents/id_123/confirm", + null, + null, + "{\"error\":{\"type\":\"fx_quote_needs_refresh\",\"code\":\"payout_intent_fx_quote_expired\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + try { + client.v2().moneyManagement().payoutIntents().confirm("id_123"); + } catch (FxQuoteNeedsRefreshException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_intents/id_123/confirm", + null, + null); + } + + @Test + public void testInsufficientFundsErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments", + null, + null, + "{\"error\":{\"type\":\"insufficient_funds\",\"code\":\"insufficient_funds\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() + .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setFrom( + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() + .setCurrency("usd") + .setFinancialAccount("financial_account") + .build()) + .setTo( + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.To.builder() + .setRecipient("recipient") + .build()) + .build(); + + try { + client.v2().moneyManagement().outboundPayments().create(params); + } catch (InsufficientFundsException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments", + params.toMap(), + null); + } + + @Test + public void testInvalidPaymentMethodErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts", + null, + null, + "{\"error\":{\"type\":\"invalid_payment_method\",\"code\":\"invalid_us_bank_account\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.UsBankAccountCreateParams params = + com.stripe.param.v2.core.vault.UsBankAccountCreateParams.builder() + .setAccountNumber("account_number") + .setCurrency("usd") + .build(); + + try { + client.v2().core().vault().usBankAccounts().create(params); + } catch (InvalidPaymentMethodException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts", + params.toMap(), + null); + } + + @Test + public void testInvalidPayoutMethodErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_setup_intents", + null, + null, + "{\"error\":{\"type\":\"invalid_payout_method\",\"code\":\"invalid_payout_method\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.OutboundSetupIntentCreateParams params = + com.stripe.param.v2.moneymanagement.OutboundSetupIntentCreateParams.builder().build(); + + try { + client.v2().moneyManagement().outboundSetupIntents().create(params); + } catch (InvalidPayoutMethodException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_setup_intents", + params.toMap(), + null); + } + + @Test + public void testInvalidVaultedCredentialErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts", + null, + null, + "{\"error\":{\"type\":\"invalid_vaulted_credential\",\"code\":\"invalid_gb_bank_account\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.GbBankAccountCreateParams params = + com.stripe.param.v2.core.vault.GbBankAccountCreateParams.builder() + .setCurrency("usd") + .build(); + + try { + client.v2().core().vault().gbBankAccounts().create(params); + } catch (InvalidVaultedCredentialException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts", + params.toMap(), + null); + } + + @Test + public void testNotCancelableErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments/id_123/cancel", + null, + null, + "{\"error\":{\"type\":\"not_cancelable\",\"code\":\"outbound_payment_not_cancelable\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + try { + client.v2().moneyManagement().outboundPayments().cancel("id_123"); + } catch (NotCancelableException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments/id_123/cancel", + null, + null); + } + + @Test + public void testQuotaExceededErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts", + null, + null, + "{\"error\":{\"type\":\"quota_exceeded\",\"code\":\"limit_gb_bank_account\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.GbBankAccountCreateParams params = + com.stripe.param.v2.core.vault.GbBankAccountCreateParams.builder() + .setCurrency("usd") + .build(); + + try { + client.v2().core().vault().gbBankAccounts().create(params); + } catch (QuotaExceededException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts", + params.toMap(), + null); + } + @Test public void testRateLimitErrorServices() throws StripeException { stubRequestReturnError( @@ -25268,6 +27317,46 @@ public void testRateLimitErrorServices() throws StripeException { BaseAddress.API, ApiResource.RequestMethod.GET, "/v2/core/accounts", params.toMap(), null); } + @Test + public void testRecipientNotNotifiableErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments", + null, + null, + "{\"error\":{\"type\":\"recipient_not_notifiable\",\"code\":\"recipient_email_does_not_exist\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() + .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setFrom( + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() + .setCurrency("usd") + .setFinancialAccount("financial_account") + .build()) + .setTo( + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.To.builder() + .setRecipient("recipient") + .build()) + .build(); + + try { + client.v2().moneyManagement().outboundPayments().create(params); + } catch (RecipientNotNotifiableException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments", + params.toMap(), + null); + } + @Test public void testTemporarySessionExpiredErrorServices() throws StripeException { stubRequestReturnError( @@ -25302,4 +27391,91 @@ public void testTemporarySessionExpiredErrorServices() throws StripeException { params.toMap(), null); } + + @Test + public void testVerificationAttemptFailedErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + null, + null, + "{\"error\":{\"type\":\"verification_attempt_failed\",\"code\":\"us_bank_account_confirm_microdeposits_failure\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.UsBankAccountConfirmMicrodepositsParams params = + com.stripe.param.v2.core.vault.UsBankAccountConfirmMicrodepositsParams.builder().build(); + + try { + client.v2().core().vault().usBankAccounts().confirmMicrodeposits("id_123", params); + } catch (VerificationAttemptFailedException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + params.toMap(), + null); + } + + @Test + public void testVerificationExpiredErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + null, + null, + "{\"error\":{\"type\":\"verification_expired\",\"code\":\"us_bank_account_microdeposits_timed_out\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.UsBankAccountConfirmMicrodepositsParams params = + com.stripe.param.v2.core.vault.UsBankAccountConfirmMicrodepositsParams.builder().build(); + + try { + client.v2().core().vault().usBankAccounts().confirmMicrodeposits("id_123", params); + } catch (VerificationExpiredException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + params.toMap(), + null); + } + + @Test + public void testVerificationNotInitiatedErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + null, + null, + "{\"error\":{\"type\":\"verification_not_initiated\",\"code\":\"us_bank_account_microdeposits_not_sent_before_confirming\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.vault.UsBankAccountConfirmMicrodepositsParams params = + com.stripe.param.v2.core.vault.UsBankAccountConfirmMicrodepositsParams.builder().build(); + + try { + client.v2().core().vault().usBankAccounts().confirmMicrodeposits("id_123", params); + } catch (VerificationNotInitiatedException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + params.toMap(), + null); + } }