From f773212886e7da424e4d8ed7eb9c34e905646c5f Mon Sep 17 00:00:00 2001 From: richardm-stripe <52928443+richardm-stripe@users.noreply.github.com> Date: Thu, 5 Sep 2019 09:13:48 -0400 Subject: [PATCH] Prettier codegen (#827) * Code generated via prettier-poet --- src/main/java/com/stripe/model/Account.java | 39 +++--- .../com/stripe/model/AccountCollection.java | 2 - .../java/com/stripe/model/AccountLink.java | 8 +- src/main/java/com/stripe/model/Address.java | 2 - .../java/com/stripe/model/AlipayAccount.java | 2 - .../java/com/stripe/model/ApplePayDomain.java | 21 +-- .../model/ApplePayDomainCollection.java | 2 - .../java/com/stripe/model/Application.java | 2 - .../java/com/stripe/model/ApplicationFee.java | 12 +- .../model/ApplicationFeeCollection.java | 2 - src/main/java/com/stripe/model/Balance.java | 12 +- .../com/stripe/model/BalanceTransaction.java | 14 +- .../model/BalanceTransactionCollection.java | 2 - .../model/BalanceTransactionSource.java | 2 - ...ceTransactionSourceTypeAdapterFactory.java | 8 +- .../java/com/stripe/model/BankAccount.java | 124 +++++++----------- .../com/stripe/model/BitcoinReceiver.java | 12 +- .../model/BitcoinReceiverCollection.java | 2 - .../com/stripe/model/BitcoinTransaction.java | 2 - .../model/BitcoinTransactionCollection.java | 2 - .../java/com/stripe/model/Capability.java | 61 +++------ .../stripe/model/CapabilityCollection.java | 2 - src/main/java/com/stripe/model/Card.java | 4 +- .../java/com/stripe/model/CardCollection.java | 2 - src/main/java/com/stripe/model/Charge.java | 28 ++-- .../com/stripe/model/ChargeCollection.java | 2 - .../model/ConnectCollectionTransfer.java | 2 - .../java/com/stripe/model/CountrySpec.java | 12 +- .../stripe/model/CountrySpecCollection.java | 2 - src/main/java/com/stripe/model/Coupon.java | 21 ++- .../com/stripe/model/CouponCollection.java | 2 - .../java/com/stripe/model/CreditNote.java | 30 +++-- .../stripe/model/CreditNoteCollection.java | 2 - src/main/java/com/stripe/model/Customer.java | 34 +++-- .../model/CustomerBalanceTransaction.java | 61 +++------ .../CustomerBalanceTransactionCollection.java | 2 - .../com/stripe/model/CustomerCollection.java | 2 - src/main/java/com/stripe/model/Discount.java | 2 - src/main/java/com/stripe/model/Dispute.java | 20 ++- .../com/stripe/model/DisputeCollection.java | 2 - .../stripe/model/EventDataClassLookup.java | 55 ++++---- .../java/com/stripe/model/ExchangeRate.java | 12 +- .../stripe/model/ExchangeRateCollection.java | 2 - .../com/stripe/model/ExternalAccount.java | 8 +- .../model/ExternalAccountCollection.java | 2 - .../ExternalAccountTypeAdapterFactory.java | 31 ++--- src/main/java/com/stripe/model/FeeRefund.java | 51 +++---- .../com/stripe/model/FeeRefundCollection.java | 2 - src/main/java/com/stripe/model/FileLink.java | 22 ++-- .../com/stripe/model/FileLinkCollection.java | 2 - src/main/java/com/stripe/model/Invoice.java | 53 ++++---- .../com/stripe/model/InvoiceCollection.java | 2 - .../java/com/stripe/model/InvoiceItem.java | 29 ++-- .../stripe/model/InvoiceItemCollection.java | 2 - .../com/stripe/model/InvoiceLineItem.java | 2 - .../model/InvoiceLineItemCollection.java | 2 - .../stripe/model/InvoiceLineItemPeriod.java | 2 - .../com/stripe/model/IssuerFraudRecord.java | 12 +- .../model/IssuerFraudRecordCollection.java | 2 - src/main/java/com/stripe/model/LoginLink.java | 8 +- src/main/java/com/stripe/model/Order.java | 30 ++--- .../com/stripe/model/OrderCollection.java | 2 - src/main/java/com/stripe/model/OrderItem.java | 2 - .../java/com/stripe/model/OrderReturn.java | 12 +- .../stripe/model/OrderReturnCollection.java | 2 - .../com/stripe/model/PackageDimensions.java | 2 - .../java/com/stripe/model/PaymentIntent.java | 42 +++--- .../stripe/model/PaymentIntentCollection.java | 2 - .../java/com/stripe/model/PaymentMethod.java | 36 +++-- .../stripe/model/PaymentMethodCollection.java | 2 - .../java/com/stripe/model/PaymentSource.java | 2 - .../stripe/model/PaymentSourceCollection.java | 2 - .../PaymentSourceTypeAdapterFactory.java | 9 +- src/main/java/com/stripe/model/Payout.java | 24 ++-- .../com/stripe/model/PayoutCollection.java | 2 - src/main/java/com/stripe/model/Person.java | 88 ++++--------- .../com/stripe/model/PersonCollection.java | 2 - src/main/java/com/stripe/model/Plan.java | 22 ++-- .../java/com/stripe/model/PlanCollection.java | 2 - .../java/com/stripe/model/PlatformTaxFee.java | 2 - src/main/java/com/stripe/model/Product.java | 21 ++- .../com/stripe/model/ProductCollection.java | 2 - src/main/java/com/stripe/model/Recipient.java | 27 ++-- .../com/stripe/model/RecipientCollection.java | 2 - src/main/java/com/stripe/model/Refund.java | 20 ++- .../com/stripe/model/RefundCollection.java | 2 - .../com/stripe/model/ReserveTransaction.java | 2 - src/main/java/com/stripe/model/Review.java | 14 +- .../com/stripe/model/ReviewCollection.java | 2 - .../java/com/stripe/model/SetupIntent.java | 36 +++-- .../stripe/model/SetupIntentCollection.java | 2 - .../com/stripe/model/ShippingDetails.java | 2 - src/main/java/com/stripe/model/Sku.java | 20 ++- .../java/com/stripe/model/SkuCollection.java | 2 - src/main/java/com/stripe/model/Source.java | 57 ++++---- .../model/SourceMandateNotification.java | 2 - .../com/stripe/model/SourceTransaction.java | 2 - .../model/SourceTransactionCollection.java | 2 - .../java/com/stripe/model/StripeError.java | 2 - .../com/stripe/model/StripeErrorResponse.java | 2 - .../java/com/stripe/model/Subscription.java | 33 +++-- .../stripe/model/SubscriptionCollection.java | 2 - .../com/stripe/model/SubscriptionItem.java | 34 +++-- .../model/SubscriptionItemCollection.java | 2 - .../stripe/model/SubscriptionSchedule.java | 34 ++--- .../model/SubscriptionScheduleCollection.java | 2 - src/main/java/com/stripe/model/TaxId.java | 32 ++--- .../com/stripe/model/TaxIdCollection.java | 2 - src/main/java/com/stripe/model/TaxRate.java | 18 ++- .../com/stripe/model/TaxRateCollection.java | 2 - .../java/com/stripe/model/ThreeDSecure.java | 14 +- src/main/java/com/stripe/model/Token.java | 10 +- src/main/java/com/stripe/model/Topup.java | 24 ++-- .../com/stripe/model/TopupCollection.java | 2 - src/main/java/com/stripe/model/Transfer.java | 24 ++-- .../com/stripe/model/TransferCollection.java | 2 - .../com/stripe/model/TransferReversal.java | 65 +++------ .../model/TransferReversalCollection.java | 2 - .../java/com/stripe/model/UsageRecord.java | 8 +- .../com/stripe/model/UsageRecordSummary.java | 2 - .../model/UsageRecordSummaryCollection.java | 2 - .../com/stripe/model/WebhookEndpoint.java | 27 ++-- .../model/WebhookEndpointCollection.java | 2 - .../com/stripe/model/checkout/Session.java | 12 +- .../stripe/model/issuing/Authorization.java | 34 +++-- .../issuing/AuthorizationCollection.java | 2 - .../java/com/stripe/model/issuing/Card.java | 26 ++-- .../stripe/model/issuing/CardCollection.java | 2 - .../com/stripe/model/issuing/CardDetails.java | 2 - .../com/stripe/model/issuing/Cardholder.java | 26 ++-- .../model/issuing/CardholderCollection.java | 2 - .../com/stripe/model/issuing/Dispute.java | 18 ++- .../model/issuing/DisputeCollection.java | 2 - .../stripe/model/issuing/MerchantData.java | 2 - .../com/stripe/model/issuing/Transaction.java | 20 +-- .../model/issuing/TransactionCollection.java | 2 - .../stripe/model/radar/EarlyFraudWarning.java | 12 +- .../radar/EarlyFraudWarningCollection.java | 2 - .../java/com/stripe/model/radar/Rule.java | 2 - .../com/stripe/model/radar/ValueList.java | 27 ++-- .../model/radar/ValueListCollection.java | 2 - .../com/stripe/model/radar/ValueListItem.java | 21 +-- .../model/radar/ValueListItemCollection.java | 2 - .../com/stripe/model/reporting/ReportRun.java | 18 +-- .../model/reporting/ReportRunCollection.java | 2 - .../stripe/model/reporting/ReportType.java | 12 +- .../model/reporting/ReportTypeCollection.java | 2 - .../stripe/model/sigma/ScheduledQueryRun.java | 12 +- .../sigma/ScheduledQueryRunCollection.java | 2 - .../model/terminal/ConnectionToken.java | 8 +- .../com/stripe/model/terminal/Location.java | 28 ++-- .../model/terminal/LocationCollection.java | 2 - .../com/stripe/model/terminal/Reader.java | 24 ++-- .../model/terminal/ReaderCollection.java | 2 - ...ApiResourceTypeAdapterFactoryProvider.java | 4 +- .../param/AccountCapabilitiesParams.java | 4 +- .../com/stripe/param/AccountCreateParams.java | 45 +++---- .../stripe/param/AccountLinkCreateParams.java | 4 +- .../com/stripe/param/AccountListParams.java | 6 +- .../stripe/param/AccountPersonsParams.java | 6 +- .../com/stripe/param/AccountRejectParams.java | 4 +- .../stripe/param/AccountRetrieveParams.java | 4 +- .../com/stripe/param/AccountUpdateParams.java | 45 +++---- .../param/ApplePayDomainCreateParams.java | 4 +- .../param/ApplePayDomainListParams.java | 4 +- .../param/ApplePayDomainRetrieveParams.java | 4 +- .../param/ApplicationFeeListParams.java | 6 +- .../param/ApplicationFeeRetrieveParams.java | 4 +- .../stripe/param/BalanceRetrieveParams.java | 4 +- .../param/BalanceTransactionListParams.java | 8 +- .../BalanceTransactionRetrieveParams.java | 4 +- .../stripe/param/BankAccountVerifyParams.java | 4 +- .../param/BitcoinReceiverListParams.java | 4 +- .../param/BitcoinReceiverRetrieveParams.java | 4 +- ...itcoinTransactionCollectionListParams.java | 4 +- .../param/CapabilityCollectionListParams.java | 4 +- .../CapabilityCollectionRetrieveParams.java | 4 +- .../stripe/param/CapabilityUpdateParams.java | 4 +- .../com/stripe/param/ChargeCaptureParams.java | 6 +- .../com/stripe/param/ChargeCreateParams.java | 12 +- .../com/stripe/param/ChargeListParams.java | 6 +- .../stripe/param/ChargeRetrieveParams.java | 4 +- .../com/stripe/param/ChargeUpdateParams.java | 21 ++- .../stripe/param/CountrySpecListParams.java | 4 +- .../param/CountrySpecRetrieveParams.java | 4 +- .../com/stripe/param/CouponCreateParams.java | 4 +- .../com/stripe/param/CouponListParams.java | 6 +- .../stripe/param/CouponRetrieveParams.java | 4 +- .../com/stripe/param/CouponUpdateParams.java | 4 +- .../stripe/param/CreditNoteCreateParams.java | 4 +- .../stripe/param/CreditNoteListParams.java | 4 +- .../param/CreditNoteRetrieveParams.java | 4 +- .../stripe/param/CreditNoteUpdateParams.java | 4 +- .../param/CreditNoteVoidCreditNoteParams.java | 4 +- ...anceTransactionCollectionCreateParams.java | 4 +- ...alanceTransactionCollectionListParams.java | 4 +- ...ceTransactionCollectionRetrieveParams.java | 4 +- ...ustomerBalanceTransactionUpdateParams.java | 4 +- .../CustomerBalanceTransactionsParams.java | 4 +- .../stripe/param/CustomerCreateParams.java | 33 +++-- .../com/stripe/param/CustomerListParams.java | 6 +- .../stripe/param/CustomerRetrieveParams.java | 4 +- .../stripe/param/CustomerUpdateParams.java | 31 +++-- .../com/stripe/param/DisputeCloseParams.java | 4 +- .../com/stripe/param/DisputeListParams.java | 6 +- .../stripe/param/DisputeRetrieveParams.java | 4 +- .../com/stripe/param/DisputeUpdateParams.java | 6 +- .../stripe/param/ExchangeRateListParams.java | 4 +- .../param/ExchangeRateRetrieveParams.java | 4 +- ...ExternalAccountCollectionCreateParams.java | 4 +- .../ExternalAccountCollectionListParams.java | 4 +- ...ternalAccountCollectionRetrieveParams.java | 4 +- .../param/ExternalAccountUpdateParams.java | 15 +-- .../FeeRefundCollectionCreateParams.java | 4 +- .../param/FeeRefundCollectionListParams.java | 4 +- .../FeeRefundCollectionRetrieveParams.java | 4 +- .../stripe/param/FeeRefundUpdateParams.java | 4 +- .../stripe/param/FileLinkCreateParams.java | 4 +- .../com/stripe/param/FileLinkListParams.java | 6 +- .../stripe/param/FileLinkRetrieveParams.java | 4 +- .../stripe/param/FileLinkUpdateParams.java | 8 +- .../com/stripe/param/InvoiceCreateParams.java | 12 +- .../param/InvoiceFinalizeInvoiceParams.java | 4 +- .../stripe/param/InvoiceItemCreateParams.java | 22 ++-- .../stripe/param/InvoiceItemListParams.java | 6 +- .../param/InvoiceItemRetrieveParams.java | 4 +- .../stripe/param/InvoiceItemUpdateParams.java | 10 +- .../InvoiceLineItemCollectionListParams.java | 4 +- .../com/stripe/param/InvoiceListParams.java | 8 +- .../param/InvoiceMarkUncollectibleParams.java | 4 +- .../com/stripe/param/InvoicePayParams.java | 4 +- .../stripe/param/InvoiceRetrieveParams.java | 4 +- .../param/InvoiceSendInvoiceParams.java | 4 +- .../stripe/param/InvoiceUpcomingParams.java | 29 ++-- .../com/stripe/param/InvoiceUpdateParams.java | 20 ++- .../param/InvoiceVoidInvoiceParams.java | 4 +- .../param/IssuerFraudRecordListParams.java | 4 +- .../IssuerFraudRecordRetrieveParams.java | 4 +- .../param/LoginLinkCreateOnAccountParams.java | 4 +- .../com/stripe/param/OrderCreateParams.java | 10 +- .../com/stripe/param/OrderListParams.java | 16 +-- .../java/com/stripe/param/OrderPayParams.java | 4 +- .../com/stripe/param/OrderRetrieveParams.java | 4 +- .../stripe/param/OrderReturnListParams.java | 6 +- .../stripe/param/OrderReturnOrderParams.java | 10 +- .../param/OrderReturnRetrieveParams.java | 4 +- .../com/stripe/param/OrderUpdateParams.java | 6 +- .../param/PaymentIntentCancelParams.java | 4 +- .../param/PaymentIntentCaptureParams.java | 6 +- .../param/PaymentIntentConfirmParams.java | 31 +++-- .../param/PaymentIntentCreateParams.java | 18 ++- .../stripe/param/PaymentIntentListParams.java | 6 +- .../param/PaymentIntentRetrieveParams.java | 4 +- .../param/PaymentIntentUpdateParams.java | 29 ++-- .../param/PaymentMethodAttachParams.java | 4 +- .../param/PaymentMethodCreateParams.java | 12 +- .../param/PaymentMethodDetachParams.java | 4 +- .../stripe/param/PaymentMethodListParams.java | 4 +- .../param/PaymentMethodRetrieveParams.java | 4 +- .../param/PaymentMethodUpdateParams.java | 10 +- .../PaymentSourceCollectionCreateParams.java | 4 +- .../PaymentSourceCollectionListParams.java | 4 +- ...PaymentSourceCollectionRetrieveParams.java | 4 +- .../com/stripe/param/PayoutCancelParams.java | 4 +- .../com/stripe/param/PayoutCreateParams.java | 4 +- .../com/stripe/param/PayoutListParams.java | 8 +- .../stripe/param/PayoutRetrieveParams.java | 4 +- .../com/stripe/param/PayoutUpdateParams.java | 4 +- .../param/PersonCollectionCreateParams.java | 22 ++-- .../param/PersonCollectionListParams.java | 6 +- .../param/PersonCollectionRetrieveParams.java | 4 +- .../com/stripe/param/PersonUpdateParams.java | 22 ++-- .../com/stripe/param/PlanCreateParams.java | 10 +- .../java/com/stripe/param/PlanListParams.java | 6 +- .../com/stripe/param/PlanRetrieveParams.java | 4 +- .../com/stripe/param/PlanUpdateParams.java | 4 +- .../com/stripe/param/ProductCreateParams.java | 6 +- .../com/stripe/param/ProductListParams.java | 6 +- .../stripe/param/ProductRetrieveParams.java | 4 +- .../com/stripe/param/ProductUpdateParams.java | 14 +- .../stripe/param/RecipientCreateParams.java | 4 +- .../com/stripe/param/RecipientListParams.java | 6 +- .../stripe/param/RecipientRetrieveParams.java | 4 +- .../stripe/param/RecipientUpdateParams.java | 4 +- .../param/RefundCollectionListParams.java | 4 +- .../param/RefundCollectionRetrieveParams.java | 4 +- .../com/stripe/param/RefundCreateParams.java | 4 +- .../com/stripe/param/RefundListParams.java | 6 +- .../stripe/param/RefundRetrieveParams.java | 4 +- .../com/stripe/param/RefundUpdateParams.java | 4 +- .../com/stripe/param/ReviewApproveParams.java | 4 +- .../com/stripe/param/ReviewListParams.java | 6 +- .../stripe/param/ReviewRetrieveParams.java | 4 +- .../stripe/param/SetupIntentCancelParams.java | 4 +- .../param/SetupIntentConfirmParams.java | 8 +- .../stripe/param/SetupIntentCreateParams.java | 8 +- .../stripe/param/SetupIntentListParams.java | 6 +- .../param/SetupIntentRetrieveParams.java | 4 +- .../stripe/param/SetupIntentUpdateParams.java | 4 +- .../com/stripe/param/SkuCreateParams.java | 23 ++-- .../java/com/stripe/param/SkuListParams.java | 4 +- .../com/stripe/param/SkuRetrieveParams.java | 4 +- .../com/stripe/param/SkuUpdateParams.java | 23 ++-- .../com/stripe/param/SourceCreateParams.java | 32 +++-- .../stripe/param/SourceRetrieveParams.java | 4 +- .../param/SourceSourceTransactionsParams.java | 4 +- .../com/stripe/param/SourceUpdateParams.java | 28 ++-- .../com/stripe/param/SourceVerifyParams.java | 4 +- .../param/SubscriptionCancelParams.java | 4 +- .../param/SubscriptionCreateParams.java | 24 ++-- .../param/SubscriptionItemCreateParams.java | 10 +- .../param/SubscriptionItemDeleteParams.java | 4 +- .../param/SubscriptionItemListParams.java | 4 +- .../param/SubscriptionItemRetrieveParams.java | 4 +- .../param/SubscriptionItemUpdateParams.java | 10 +- ...riptionItemUsageRecordSummariesParams.java | 4 +- .../stripe/param/SubscriptionListParams.java | 10 +- .../param/SubscriptionRetrieveParams.java | 4 +- .../SubscriptionScheduleCancelParams.java | 4 +- .../SubscriptionScheduleCreateParams.java | 35 +++-- .../param/SubscriptionScheduleListParams.java | 12 +- .../SubscriptionScheduleReleaseParams.java | 4 +- .../SubscriptionScheduleRetrieveParams.java | 4 +- .../SubscriptionScheduleUpdateParams.java | 43 +++--- .../param/SubscriptionUpdateParams.java | 28 ++-- .../param/TaxIdCollectionCreateParams.java | 4 +- .../param/TaxIdCollectionListParams.java | 4 +- .../param/TaxIdCollectionRetrieveParams.java | 4 +- .../com/stripe/param/TaxRateCreateParams.java | 4 +- .../com/stripe/param/TaxRateListParams.java | 8 +- .../stripe/param/TaxRateRetrieveParams.java | 4 +- .../com/stripe/param/TaxRateUpdateParams.java | 4 +- .../param/ThreeDSecureCreateParams.java | 4 +- .../param/ThreeDSecureRetrieveParams.java | 4 +- .../com/stripe/param/TokenCreateParams.java | 10 +- .../com/stripe/param/TokenRetrieveParams.java | 4 +- .../com/stripe/param/TopupCancelParams.java | 4 +- .../com/stripe/param/TopupCreateParams.java | 4 +- .../com/stripe/param/TopupListParams.java | 8 +- .../com/stripe/param/TopupRetrieveParams.java | 4 +- .../com/stripe/param/TopupUpdateParams.java | 4 +- .../stripe/param/TransferCreateParams.java | 4 +- .../com/stripe/param/TransferListParams.java | 6 +- .../stripe/param/TransferRetrieveParams.java | 4 +- ...ransferReversalCollectionCreateParams.java | 4 +- .../TransferReversalCollectionListParams.java | 4 +- ...nsferReversalCollectionRetrieveParams.java | 4 +- .../param/TransferReversalUpdateParams.java | 4 +- .../stripe/param/TransferUpdateParams.java | 4 +- ...eRecordCreateOnSubscriptionItemParams.java | 4 +- .../param/WebhookEndpointCreateParams.java | 4 +- .../param/WebhookEndpointListParams.java | 4 +- .../param/WebhookEndpointRetrieveParams.java | 4 +- .../param/WebhookEndpointUpdateParams.java | 4 +- .../param/checkout/SessionCreateParams.java | 23 ++-- .../param/checkout/SessionRetrieveParams.java | 4 +- .../issuing/AuthorizationApproveParams.java | 4 +- .../issuing/AuthorizationDeclineParams.java | 4 +- .../issuing/AuthorizationListParams.java | 6 +- .../issuing/AuthorizationRetrieveParams.java | 4 +- .../issuing/AuthorizationUpdateParams.java | 4 +- .../param/issuing/CardCreateParams.java | 51 ++++--- .../param/issuing/CardDetailsParams.java | 4 +- .../stripe/param/issuing/CardListParams.java | 6 +- .../param/issuing/CardRetrieveParams.java | 4 +- .../param/issuing/CardUpdateParams.java | 37 +++--- .../param/issuing/CardholderCreateParams.java | 41 +++--- .../param/issuing/CardholderListParams.java | 6 +- .../issuing/CardholderRetrieveParams.java | 4 +- .../param/issuing/CardholderUpdateParams.java | 41 +++--- .../param/issuing/DisputeCreateParams.java | 10 +- .../param/issuing/DisputeListParams.java | 6 +- .../param/issuing/DisputeRetrieveParams.java | 4 +- .../param/issuing/DisputeUpdateParams.java | 4 +- .../param/issuing/TransactionListParams.java | 6 +- .../issuing/TransactionRetrieveParams.java | 4 +- .../issuing/TransactionUpdateParams.java | 4 +- .../radar/EarlyFraudWarningListParams.java | 4 +- .../EarlyFraudWarningRetrieveParams.java | 4 +- .../param/radar/ValueListCreateParams.java | 4 +- .../radar/ValueListItemCreateParams.java | 4 +- .../param/radar/ValueListItemListParams.java | 6 +- .../radar/ValueListItemRetrieveParams.java | 4 +- .../param/radar/ValueListListParams.java | 6 +- .../param/radar/ValueListRetrieveParams.java | 4 +- .../param/radar/ValueListUpdateParams.java | 4 +- .../reporting/ReportRunCreateParams.java | 6 +- .../param/reporting/ReportRunListParams.java | 6 +- .../reporting/ReportRunRetrieveParams.java | 4 +- .../param/reporting/ReportTypeListParams.java | 4 +- .../reporting/ReportTypeRetrieveParams.java | 4 +- .../sigma/ScheduledQueryRunListParams.java | 4 +- .../ScheduledQueryRunRetrieveParams.java | 4 +- .../terminal/ConnectionTokenCreateParams.java | 4 +- .../param/terminal/LocationCreateParams.java | 6 +- .../param/terminal/LocationDeleteParams.java | 4 +- .../param/terminal/LocationListParams.java | 4 +- .../terminal/LocationRetrieveParams.java | 4 +- .../param/terminal/LocationUpdateParams.java | 6 +- .../param/terminal/ReaderCreateParams.java | 4 +- .../param/terminal/ReaderDeleteParams.java | 4 +- .../param/terminal/ReaderListParams.java | 4 +- .../param/terminal/ReaderRetrieveParams.java | 4 +- .../param/terminal/ReaderUpdateParams.java | 4 +- 404 files changed, 1575 insertions(+), 2394 deletions(-) diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index 2330c94268f..947d5b686d3 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -23,7 +21,7 @@ @Getter @Setter @EqualsAndHashCode(callSuper = false) -public class Account extends ApiResource implements PaymentSource, MetadataStore { +public class Account extends ApiResource implements MetadataStore, PaymentSource { /** Optional information related to the business. */ @SerializedName("business_profile") BusinessProfile businessProfile; @@ -128,14 +126,14 @@ public static Account retrieve(RequestOptions options) throws StripeException { public static Account retrieve(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/account"); - return request(ApiResource.RequestMethod.GET, url, params, Account.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Account.class, options); } /** Retrieves the details of an account. */ public static Account retrieve(AccountRetrieveParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/account"); - return request(ApiResource.RequestMethod.GET, url, params, Account.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Account.class, options); } /** Retrieves the details of an account. */ @@ -156,7 +154,7 @@ public static Account retrieve(String account, Map params, Reque "%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s", ApiResource.urlEncodeId(account))); - return request(ApiResource.RequestMethod.GET, url, params, Account.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Account.class, options); } /** Retrieves the details of an account. */ @@ -167,7 +165,7 @@ public static Account retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s", ApiResource.urlEncodeId(account))); - return request(ApiResource.RequestMethod.GET, url, params, Account.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Account.class, options); } /** @@ -206,7 +204,7 @@ public Account update(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Account.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Account.class, options); } /** @@ -243,7 +241,7 @@ public Account update(AccountUpdateParams params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Account.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Account.class, options); } /** @@ -261,7 +259,7 @@ public static AccountCollection list(Map params) throws StripeEx public static AccountCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/accounts"); - return requestCollection(url, params, AccountCollection.class, options); + return ApiResource.requestCollection(url, params, AccountCollection.class, options); } /** @@ -279,7 +277,7 @@ public static AccountCollection list(AccountListParams params) throws StripeExce public static AccountCollection list(AccountListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/accounts"); - return requestCollection(url, params, AccountCollection.class, options); + return ApiResource.requestCollection(url, params, AccountCollection.class, options); } /** @@ -307,7 +305,7 @@ public static Account create(Map params) throws StripeException public static Account create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/accounts"); - return request(ApiResource.RequestMethod.POST, url, params, Account.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Account.class, options); } /** @@ -335,7 +333,7 @@ public static Account create(AccountCreateParams params) throws StripeException public static Account create(AccountCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/accounts"); - return request(ApiResource.RequestMethod.POST, url, params, Account.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Account.class, options); } /** @@ -392,7 +390,8 @@ public Account delete(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Account.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Account.class, options); } /** @@ -417,7 +416,7 @@ public Account reject(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s/reject", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Account.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Account.class, options); } /** @@ -442,7 +441,7 @@ public Account reject(AccountRejectParams params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s/reject", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Account.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Account.class, options); } /** @@ -472,7 +471,7 @@ public PersonCollection persons(Map params, RequestOptions optio "%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s/persons", ApiResource.urlEncodeId(this.getId()))); - return requestCollection(url, params, PersonCollection.class, options); + return ApiResource.requestCollection(url, params, PersonCollection.class, options); } /** @@ -494,7 +493,7 @@ public PersonCollection persons(AccountPersonsParams params, RequestOptions opti "%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s/persons", ApiResource.urlEncodeId(this.getId()))); - return requestCollection(url, params, PersonCollection.class, options); + return ApiResource.requestCollection(url, params, PersonCollection.class, options); } /** @@ -524,7 +523,7 @@ public CapabilityCollection capabilities(Map params, RequestOpti "%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s/capabilities", ApiResource.urlEncodeId(this.getId()))); - return requestCollection(url, params, CapabilityCollection.class, options); + return ApiResource.requestCollection(url, params, CapabilityCollection.class, options); } /** @@ -547,7 +546,7 @@ public CapabilityCollection capabilities(AccountCapabilitiesParams params, Reque "%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s/capabilities", ApiResource.urlEncodeId(this.getId()))); - return requestCollection(url, params, CapabilityCollection.class, options); + return ApiResource.requestCollection(url, params, CapabilityCollection.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/AccountCollection.java b/src/main/java/com/stripe/model/AccountCollection.java index 0b33ec55d83..f15a2062bf6 100644 --- a/src/main/java/com/stripe/model/AccountCollection.java +++ b/src/main/java/com/stripe/model/AccountCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class AccountCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/AccountLink.java b/src/main/java/com/stripe/model/AccountLink.java index 0d2a1402969..56f3cfaab16 100644 --- a/src/main/java/com/stripe/model/AccountLink.java +++ b/src/main/java/com/stripe/model/AccountLink.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -48,7 +46,8 @@ public static AccountLink create(Map params) throws StripeExcept public static AccountLink create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/account_links"); - return request(ApiResource.RequestMethod.POST, url, params, AccountLink.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, AccountLink.class, options); } /** @@ -66,6 +65,7 @@ public static AccountLink create(AccountLinkCreateParams params) throws StripeEx public static AccountLink create(AccountLinkCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/account_links"); - return request(ApiResource.RequestMethod.POST, url, params, AccountLink.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, AccountLink.class, options); } } diff --git a/src/main/java/com/stripe/model/Address.java b/src/main/java/com/stripe/model/Address.java index b28d3e35bd4..53c5596d9e3 100644 --- a/src/main/java/com/stripe/model/Address.java +++ b/src/main/java/com/stripe/model/Address.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/AlipayAccount.java b/src/main/java/com/stripe/model/AlipayAccount.java index f39f647da79..2638a32520c 100644 --- a/src/main/java/com/stripe/model/AlipayAccount.java +++ b/src/main/java/com/stripe/model/AlipayAccount.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/ApplePayDomain.java b/src/main/java/com/stripe/model/ApplePayDomain.java index 6327321cf62..f507ef7c255 100644 --- a/src/main/java/com/stripe/model/ApplePayDomain.java +++ b/src/main/java/com/stripe/model/ApplePayDomain.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -55,7 +53,7 @@ public static ApplePayDomainCollection list(Map params) throws S public static ApplePayDomainCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/apple_pay/domains"); - return requestCollection(url, params, ApplePayDomainCollection.class, options); + return ApiResource.requestCollection(url, params, ApplePayDomainCollection.class, options); } /** List apple pay domains. */ @@ -68,7 +66,7 @@ public static ApplePayDomainCollection list(ApplePayDomainListParams params) public static ApplePayDomainCollection list( ApplePayDomainListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/apple_pay/domains"); - return requestCollection(url, params, ApplePayDomainCollection.class, options); + return ApiResource.requestCollection(url, params, ApplePayDomainCollection.class, options); } /** Create an apple pay domain. */ @@ -80,7 +78,8 @@ public static ApplePayDomain create(Map params) throws StripeExc public static ApplePayDomain create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/apple_pay/domains"); - return request(ApiResource.RequestMethod.POST, url, params, ApplePayDomain.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ApplePayDomain.class, options); } /** Create an apple pay domain. */ @@ -92,7 +91,8 @@ public static ApplePayDomain create(ApplePayDomainCreateParams params) throws St public static ApplePayDomain create(ApplePayDomainCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/apple_pay/domains"); - return request(ApiResource.RequestMethod.POST, url, params, ApplePayDomain.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ApplePayDomain.class, options); } /** Retrieve an apple pay domain. */ @@ -114,7 +114,8 @@ public static ApplePayDomain retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/apple_pay/domains/%s", ApiResource.urlEncodeId(domain))); - return request(ApiResource.RequestMethod.GET, url, params, ApplePayDomain.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ApplePayDomain.class, options); } /** Retrieve an apple pay domain. */ @@ -126,7 +127,8 @@ public static ApplePayDomain retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/apple_pay/domains/%s", ApiResource.urlEncodeId(domain))); - return request(ApiResource.RequestMethod.GET, url, params, ApplePayDomain.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ApplePayDomain.class, options); } /** Delete an apple pay domain. */ @@ -152,6 +154,7 @@ public ApplePayDomain delete(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/apple_pay/domains/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, ApplePayDomain.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, ApplePayDomain.class, options); } } diff --git a/src/main/java/com/stripe/model/ApplePayDomainCollection.java b/src/main/java/com/stripe/model/ApplePayDomainCollection.java index a6a6e5212ee..757e6581625 100644 --- a/src/main/java/com/stripe/model/ApplePayDomainCollection.java +++ b/src/main/java/com/stripe/model/ApplePayDomainCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class ApplePayDomainCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Application.java b/src/main/java/com/stripe/model/Application.java index 7e253751555..33e16962916 100644 --- a/src/main/java/com/stripe/model/Application.java +++ b/src/main/java/com/stripe/model/Application.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/ApplicationFee.java b/src/main/java/com/stripe/model/ApplicationFee.java index 054eea2a313..b23ac47aa04 100644 --- a/src/main/java/com/stripe/model/ApplicationFee.java +++ b/src/main/java/com/stripe/model/ApplicationFee.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -210,7 +208,7 @@ public static ApplicationFeeCollection list(Map params) throws S public static ApplicationFeeCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/application_fees"); - return requestCollection(url, params, ApplicationFeeCollection.class, options); + return ApiResource.requestCollection(url, params, ApplicationFeeCollection.class, options); } /** @@ -229,7 +227,7 @@ public static ApplicationFeeCollection list(ApplicationFeeListParams params) public static ApplicationFeeCollection list( ApplicationFeeListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/application_fees"); - return requestCollection(url, params, ApplicationFeeCollection.class, options); + return ApiResource.requestCollection(url, params, ApplicationFeeCollection.class, options); } /** @@ -259,7 +257,8 @@ public static ApplicationFee retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/application_fees/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, ApplicationFee.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ApplicationFee.class, options); } /** @@ -274,6 +273,7 @@ public static ApplicationFee retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/application_fees/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, ApplicationFee.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ApplicationFee.class, options); } } diff --git a/src/main/java/com/stripe/model/ApplicationFeeCollection.java b/src/main/java/com/stripe/model/ApplicationFeeCollection.java index 5f833f514b1..55a8681b40b 100644 --- a/src/main/java/com/stripe/model/ApplicationFeeCollection.java +++ b/src/main/java/com/stripe/model/ApplicationFeeCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class ApplicationFeeCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Balance.java b/src/main/java/com/stripe/model/Balance.java index 9881916c31e..61f68420a1f 100644 --- a/src/main/java/com/stripe/model/Balance.java +++ b/src/main/java/com/stripe/model/Balance.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -24,14 +22,14 @@ public class Balance extends ApiResource { * balance for each currency and payment type can be found in the `source_types` property. */ @SerializedName("available") - List available; + List available; /** * Funds held due to negative balances on connected Custom accounts. The connect reserve balance * for each currency and payment type can be found in the `source_types` property. */ @SerializedName("connect_reserved") - List connectReserved; + List connectReserved; /** * Has the value `true` if the object exists in live mode or the value `false` if the object @@ -50,7 +48,7 @@ public class Balance extends ApiResource { * `source_types` property. */ @SerializedName("pending") - List pending; + List pending; /** * Retrieves the current account balance, based on the authentication that was used to make the @@ -81,7 +79,7 @@ public static Balance retrieve(RequestOptions options) throws StripeException { public static Balance retrieve(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/balance"); - return request(ApiResource.RequestMethod.GET, url, params, Balance.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Balance.class, options); } /** @@ -93,7 +91,7 @@ public static Balance retrieve(Map params, RequestOptions option public static Balance retrieve(BalanceRetrieveParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/balance"); - return request(ApiResource.RequestMethod.GET, url, params, Balance.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Balance.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/BalanceTransaction.java b/src/main/java/com/stripe/model/BalanceTransaction.java index 3e99f8e6124..26f5991516f 100644 --- a/src/main/java/com/stripe/model/BalanceTransaction.java +++ b/src/main/java/com/stripe/model/BalanceTransaction.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -52,7 +50,7 @@ public class BalanceTransaction extends ApiResource implements HasId { /** Detailed breakdown of fees (in %s) paid for this transaction. */ @SerializedName("fee_details") - List feeDetails; + List feeDetails; /** Unique identifier for the object. */ @Getter(onMethod_ = {@Override}) @@ -137,7 +135,7 @@ public static BalanceTransactionCollection list(Map params) public static BalanceTransactionCollection list( Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/balance_transactions"); - return requestCollection(url, params, BalanceTransactionCollection.class, options); + return ApiResource.requestCollection(url, params, BalanceTransactionCollection.class, options); } /** @@ -164,7 +162,7 @@ public static BalanceTransactionCollection list(BalanceTransactionListParams par public static BalanceTransactionCollection list( BalanceTransactionListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/balance_transactions"); - return requestCollection(url, params, BalanceTransactionCollection.class, options); + return ApiResource.requestCollection(url, params, BalanceTransactionCollection.class, options); } /** @@ -198,7 +196,8 @@ public static BalanceTransaction retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/balance_transactions/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, BalanceTransaction.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, BalanceTransaction.class, options); } /** @@ -214,7 +213,8 @@ public static BalanceTransaction retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/balance_transactions/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, BalanceTransaction.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, BalanceTransaction.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/BalanceTransactionCollection.java b/src/main/java/com/stripe/model/BalanceTransactionCollection.java index 7318e9c22e3..e954dbb3ce2 100644 --- a/src/main/java/com/stripe/model/BalanceTransactionCollection.java +++ b/src/main/java/com/stripe/model/BalanceTransactionCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class BalanceTransactionCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/BalanceTransactionSource.java b/src/main/java/com/stripe/model/BalanceTransactionSource.java index 019b61476fa..26af2e680a4 100644 --- a/src/main/java/com/stripe/model/BalanceTransactionSource.java +++ b/src/main/java/com/stripe/model/BalanceTransactionSource.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public interface BalanceTransactionSource extends HasId {} diff --git a/src/main/java/com/stripe/model/BalanceTransactionSourceTypeAdapterFactory.java b/src/main/java/com/stripe/model/BalanceTransactionSourceTypeAdapterFactory.java index c8eff3b44e2..351534d08ec 100644 --- a/src/main/java/com/stripe/model/BalanceTransactionSourceTypeAdapterFactory.java +++ b/src/main/java/com/stripe/model/BalanceTransactionSourceTypeAdapterFactory.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.Gson; @@ -111,15 +109,13 @@ public BalanceTransactionSource read(JsonReader in) throws IOException { /** * Unknown subtype of {@link com.stripe.model.BalanceTransactionSource}. If this class is the - * outcome of deserialization, please contact support@stripe.com for assistance, and provide the - * id and object value. Do not integrate with this object, but raise exception and log its content + * outcome of deserialization, please contact support@stripe.com for assistance and provide the id + * and object value. Do not integrate with this object, but raise an exception and log its content * instead. */ public static class UnknownSubType implements BalanceTransactionSource { String id; - @Getter String object; - @Getter String rawJson; private UnknownSubType(String id, String object, String rawJson) { diff --git a/src/main/java/com/stripe/model/BankAccount.java b/src/main/java/com/stripe/model/BankAccount.java index e597735691f..c7a8fa82bcd 100644 --- a/src/main/java/com/stripe/model/BankAccount.java +++ b/src/main/java/com/stripe/model/BankAccount.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -20,7 +18,7 @@ @Setter @EqualsAndHashCode(callSuper = false) public class BankAccount extends ApiResource - implements ExternalAccount, PaymentSource, MetadataStore { + implements MetadataStore, ExternalAccount, PaymentSource { @SerializedName("account") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) @@ -148,6 +146,56 @@ public void setCustomerObject(Customer expandableObject) { this.customer = new ExpandableField(expandableObject.getId(), expandableObject); } + /** Verify a specified bank account for a given customer. */ + public BankAccount verify() throws StripeException { + return verify((Map) null, (RequestOptions) null); + } + + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(RequestOptions options) throws StripeException { + return verify((Map) null, options); + } + + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(Map params) throws StripeException { + return verify(params, (RequestOptions) null); + } + + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(Map params, RequestOptions options) + throws StripeException { + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/customers/%s/sources/%s/verify", + ApiResource.urlEncodeId(this.getCustomer()), + ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, BankAccount.class, options); + } + + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(BankAccountVerifyParams params) throws StripeException { + return verify(params, (RequestOptions) null); + } + + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(BankAccountVerifyParams params, RequestOptions options) + throws StripeException { + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/customers/%s/sources/%s/verify", + ApiResource.urlEncodeId(this.getCustomer()), + ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, BankAccount.class, options); + } + /** * Updates the metadata, account holder name, and account holder type of a bank account belonging * to a Custom account, and optionally sets it as the @@ -383,74 +431,4 @@ public BankAccount delete(Map params, RequestOptions options) } return request(ApiResource.RequestMethod.DELETE, url, params, BankAccount.class, options); } - - /** Verify a specified bank account for a given customer. */ - public BankAccount verify() throws StripeException { - return verify((Map) null, (RequestOptions) null); - } - - /** Verify a specified bank account for a given customer. */ - public BankAccount verify(RequestOptions options) throws StripeException { - return verify((Map) null, options); - } - - /** Verify a specified bank account for a given customer. */ - public BankAccount verify(Map params) throws StripeException { - return verify(params, (RequestOptions) null); - } - - /** Verify a specified bank account for a given customer. */ - public BankAccount verify(Map params, RequestOptions options) - throws StripeException { - String url; - if (this.getCustomer() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/customers/%s/sources/%s/verify", - ApiResource.urlEncodeId(this.getCustomer()), - ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [customer] field(s) are all null", - null, - null, - null, - 0, - null); - } - return request(ApiResource.RequestMethod.POST, url, params, BankAccount.class, options); - } - - /** Verify a specified bank account for a given customer. */ - public BankAccount verify(BankAccountVerifyParams params) throws StripeException { - return verify(params, (RequestOptions) null); - } - - /** Verify a specified bank account for a given customer. */ - public BankAccount verify(BankAccountVerifyParams params, RequestOptions options) - throws StripeException { - String url; - if (this.getCustomer() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/customers/%s/sources/%s/verify", - ApiResource.urlEncodeId(this.getCustomer()), - ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [customer] field(s) are all null", - null, - null, - null, - 0, - null); - } - return request(ApiResource.RequestMethod.POST, url, params, BankAccount.class, options); - } } diff --git a/src/main/java/com/stripe/model/BitcoinReceiver.java b/src/main/java/com/stripe/model/BitcoinReceiver.java index 86126a7c76d..c8307403a69 100644 --- a/src/main/java/com/stripe/model/BitcoinReceiver.java +++ b/src/main/java/com/stripe/model/BitcoinReceiver.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -150,7 +148,7 @@ public static BitcoinReceiverCollection list(Map params) throws public static BitcoinReceiverCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/bitcoin/receivers"); - return requestCollection(url, params, BitcoinReceiverCollection.class, options); + return ApiResource.requestCollection(url, params, BitcoinReceiverCollection.class, options); } /** @@ -169,7 +167,7 @@ public static BitcoinReceiverCollection list(BitcoinReceiverListParams params) public static BitcoinReceiverCollection list( BitcoinReceiverListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/bitcoin/receivers"); - return requestCollection(url, params, BitcoinReceiverCollection.class, options); + return ApiResource.requestCollection(url, params, BitcoinReceiverCollection.class, options); } /** Retrieves the Bitcoin receiver with the given ID. */ @@ -190,7 +188,8 @@ public static BitcoinReceiver retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/bitcoin/receivers/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, BitcoinReceiver.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, BitcoinReceiver.class, options); } /** Retrieves the Bitcoin receiver with the given ID. */ @@ -202,6 +201,7 @@ public static BitcoinReceiver retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/bitcoin/receivers/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, BitcoinReceiver.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, BitcoinReceiver.class, options); } } diff --git a/src/main/java/com/stripe/model/BitcoinReceiverCollection.java b/src/main/java/com/stripe/model/BitcoinReceiverCollection.java index 06293d945a9..0c15c872cd6 100644 --- a/src/main/java/com/stripe/model/BitcoinReceiverCollection.java +++ b/src/main/java/com/stripe/model/BitcoinReceiverCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class BitcoinReceiverCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/BitcoinTransaction.java b/src/main/java/com/stripe/model/BitcoinTransaction.java index 4b4ca96f7ea..a82fdb4cf5b 100644 --- a/src/main/java/com/stripe/model/BitcoinTransaction.java +++ b/src/main/java/com/stripe/model/BitcoinTransaction.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/BitcoinTransactionCollection.java b/src/main/java/com/stripe/model/BitcoinTransactionCollection.java index 12b334d6a8c..b4a7ff938c1 100644 --- a/src/main/java/com/stripe/model/BitcoinTransactionCollection.java +++ b/src/main/java/com/stripe/model/BitcoinTransactionCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.stripe.Stripe; diff --git a/src/main/java/com/stripe/model/Capability.java b/src/main/java/com/stripe/model/Capability.java index 7bbd1aa6075..9d348178a86 100644 --- a/src/main/java/com/stripe/model/Capability.java +++ b/src/main/java/com/stripe/model/Capability.java @@ -1,10 +1,7 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; import com.stripe.Stripe; -import com.stripe.exception.InvalidRequestException; import com.stripe.exception.StripeException; import com.stripe.net.ApiResource; import com.stripe.net.RequestOptions; @@ -75,26 +72,15 @@ public Capability update(Map params) throws StripeException { /** Updates an existing Account Capability. */ public Capability update(Map params, RequestOptions options) throws StripeException { - String url; - if (this.getAccount() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/accounts/%s/capabilities/%s", - ApiResource.urlEncodeId(this.getAccount()), - ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [account] field(s) are all null", - null, - null, - null, - 0, - null); - } - return request(ApiResource.RequestMethod.POST, url, params, Capability.class, options); + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/accounts/%s/capabilities/%s", + ApiResource.urlEncodeId(this.getAccount()), ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Capability.class, options); } /** Updates an existing Account Capability. */ @@ -105,26 +91,15 @@ public Capability update(CapabilityUpdateParams params) throws StripeException { /** Updates an existing Account Capability. */ public Capability update(CapabilityUpdateParams params, RequestOptions options) throws StripeException { - String url; - if (this.getAccount() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/accounts/%s/capabilities/%s", - ApiResource.urlEncodeId(this.getAccount()), - ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [account] field(s) are all null", - null, - null, - null, - 0, - null); - } - return request(ApiResource.RequestMethod.POST, url, params, Capability.class, options); + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/accounts/%s/capabilities/%s", + ApiResource.urlEncodeId(this.getAccount()), ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Capability.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/CapabilityCollection.java b/src/main/java/com/stripe/model/CapabilityCollection.java index 837b75949c0..f4df8f77015 100644 --- a/src/main/java/com/stripe/model/CapabilityCollection.java +++ b/src/main/java/com/stripe/model/CapabilityCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.stripe.Stripe; diff --git a/src/main/java/com/stripe/model/Card.java b/src/main/java/com/stripe/model/Card.java index a9c2fb8f092..4d0c9de30ba 100644 --- a/src/main/java/com/stripe/model/Card.java +++ b/src/main/java/com/stripe/model/Card.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -20,7 +18,7 @@ @Setter @EqualsAndHashCode(callSuper = false) public class Card extends ApiResource - implements ExternalAccount, PaymentSource, MetadataStore { + implements MetadataStore, ExternalAccount, PaymentSource { /** * The account this card belongs to. This attribute will not be in the card object if the card * belongs to a customer or recipient instead. diff --git a/src/main/java/com/stripe/model/CardCollection.java b/src/main/java/com/stripe/model/CardCollection.java index 1ca7624fd11..bbfa7937538 100644 --- a/src/main/java/com/stripe/model/CardCollection.java +++ b/src/main/java/com/stripe/model/CardCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class CardCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index 8b6b1846e62..89205392a86 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -22,7 +20,7 @@ @Getter @Setter @EqualsAndHashCode(callSuper = false) -public class Charge extends ApiResource implements BalanceTransactionSource, MetadataStore { +public class Charge extends ApiResource implements MetadataStore, BalanceTransactionSource { @SerializedName("alternate_statement_descriptors") AlternateStatementDescriptors alternateStatementDescriptors; @@ -547,7 +545,7 @@ public static ChargeCollection list(Map params) throws StripeExc public static ChargeCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/charges"); - return requestCollection(url, params, ChargeCollection.class, options); + return ApiResource.requestCollection(url, params, ChargeCollection.class, options); } /** @@ -565,7 +563,7 @@ public static ChargeCollection list(ChargeListParams params) throws StripeExcept public static ChargeCollection list(ChargeListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/charges"); - return requestCollection(url, params, ChargeCollection.class, options); + return ApiResource.requestCollection(url, params, ChargeCollection.class, options); } /** @@ -587,7 +585,7 @@ public static Charge create(Map params) throws StripeException { public static Charge create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/charges"); - return request(ApiResource.RequestMethod.POST, url, params, Charge.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Charge.class, options); } /** @@ -609,7 +607,7 @@ public static Charge create(ChargeCreateParams params) throws StripeException { public static Charge create(ChargeCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/charges"); - return request(ApiResource.RequestMethod.POST, url, params, Charge.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Charge.class, options); } /** @@ -641,7 +639,7 @@ public static Charge retrieve(String charge, Map params, Request String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/charges/%s", ApiResource.urlEncodeId(charge))); - return request(ApiResource.RequestMethod.GET, url, params, Charge.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Charge.class, options); } /** @@ -655,7 +653,7 @@ public static Charge retrieve(String charge, ChargeRetrieveParams params, Reques String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/charges/%s", ApiResource.urlEncodeId(charge))); - return request(ApiResource.RequestMethod.GET, url, params, Charge.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Charge.class, options); } /** @@ -678,7 +676,7 @@ public Charge update(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/charges/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Charge.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Charge.class, options); } /** @@ -699,7 +697,7 @@ public Charge update(ChargeUpdateParams params, RequestOptions options) throws S "%s%s", Stripe.getApiBase(), String.format("/v1/charges/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Charge.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Charge.class, options); } /** @@ -756,7 +754,7 @@ public Charge capture(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/charges/%s/capture", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Charge.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Charge.class, options); } /** @@ -787,7 +785,7 @@ public Charge capture(ChargeCaptureParams params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/charges/%s/capture", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Charge.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Charge.class, options); } @Getter @@ -824,7 +822,7 @@ public static class Level3 extends StripeObject { String customerReference; @SerializedName("line_items") - List lineItems; + List lineItems; @SerializedName("merchant_reference") String merchantReference; @@ -1141,7 +1139,7 @@ public static class Bancontact extends StripeObject { /** * Preferred language of the Bancontact authorization page that the customer is redirected to. - * Can be one of `en`, `de`, `fr`, or `nl`. + * Can be one of `en`, `de`, `fr`, or `nl` */ @SerializedName("preferred_language") String preferredLanguage; diff --git a/src/main/java/com/stripe/model/ChargeCollection.java b/src/main/java/com/stripe/model/ChargeCollection.java index e32e955aa54..fa0cb13c999 100644 --- a/src/main/java/com/stripe/model/ChargeCollection.java +++ b/src/main/java/com/stripe/model/ChargeCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class ChargeCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/ConnectCollectionTransfer.java b/src/main/java/com/stripe/model/ConnectCollectionTransfer.java index 84036ca9eba..bf854845479 100644 --- a/src/main/java/com/stripe/model/ConnectCollectionTransfer.java +++ b/src/main/java/com/stripe/model/ConnectCollectionTransfer.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/CountrySpec.java b/src/main/java/com/stripe/model/CountrySpec.java index 3e53cb46c22..4ccf7f97d98 100644 --- a/src/main/java/com/stripe/model/CountrySpec.java +++ b/src/main/java/com/stripe/model/CountrySpec.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -67,7 +65,7 @@ public static CountrySpecCollection list(Map params) throws Stri public static CountrySpecCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/country_specs"); - return requestCollection(url, params, CountrySpecCollection.class, options); + return ApiResource.requestCollection(url, params, CountrySpecCollection.class, options); } /** Lists all Country Spec objects available in the API. */ @@ -79,7 +77,7 @@ public static CountrySpecCollection list(CountrySpecListParams params) throws St public static CountrySpecCollection list(CountrySpecListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/country_specs"); - return requestCollection(url, params, CountrySpecCollection.class, options); + return ApiResource.requestCollection(url, params, CountrySpecCollection.class, options); } /** Returns a Country Spec for a given Country code. */ @@ -101,7 +99,8 @@ public static CountrySpec retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/country_specs/%s", ApiResource.urlEncodeId(country))); - return request(ApiResource.RequestMethod.GET, url, params, CountrySpec.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, CountrySpec.class, options); } /** Returns a Country Spec for a given Country code. */ @@ -113,7 +112,8 @@ public static CountrySpec retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/country_specs/%s", ApiResource.urlEncodeId(country))); - return request(ApiResource.RequestMethod.GET, url, params, CountrySpec.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, CountrySpec.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/CountrySpecCollection.java b/src/main/java/com/stripe/model/CountrySpecCollection.java index 0a26b2c279b..f6d82bda3d6 100644 --- a/src/main/java/com/stripe/model/CountrySpecCollection.java +++ b/src/main/java/com/stripe/model/CountrySpecCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class CountrySpecCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Coupon.java b/src/main/java/com/stripe/model/Coupon.java index e3f9a34598e..7b284c846ba 100644 --- a/src/main/java/com/stripe/model/Coupon.java +++ b/src/main/java/com/stripe/model/Coupon.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -123,7 +121,7 @@ public static CouponCollection list(Map params) throws StripeExc public static CouponCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/coupons"); - return requestCollection(url, params, CouponCollection.class, options); + return ApiResource.requestCollection(url, params, CouponCollection.class, options); } /** Returns a list of your coupons. */ @@ -135,7 +133,7 @@ public static CouponCollection list(CouponListParams params) throws StripeExcept public static CouponCollection list(CouponListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/coupons"); - return requestCollection(url, params, CouponCollection.class, options); + return ApiResource.requestCollection(url, params, CouponCollection.class, options); } /** @@ -169,7 +167,7 @@ public static Coupon create(Map params) throws StripeException { public static Coupon create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/coupons"); - return request(ApiResource.RequestMethod.POST, url, params, Coupon.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Coupon.class, options); } /** @@ -203,7 +201,7 @@ public static Coupon create(CouponCreateParams params) throws StripeException { public static Coupon create(CouponCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/coupons"); - return request(ApiResource.RequestMethod.POST, url, params, Coupon.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Coupon.class, options); } /** Retrieves the coupon with the given ID. */ @@ -223,7 +221,7 @@ public static Coupon retrieve(String coupon, Map params, Request String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/coupons/%s", ApiResource.urlEncodeId(coupon))); - return request(ApiResource.RequestMethod.GET, url, params, Coupon.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Coupon.class, options); } /** Retrieves the coupon with the given ID. */ @@ -233,7 +231,7 @@ public static Coupon retrieve(String coupon, CouponRetrieveParams params, Reques String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/coupons/%s", ApiResource.urlEncodeId(coupon))); - return request(ApiResource.RequestMethod.GET, url, params, Coupon.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Coupon.class, options); } /** @@ -256,7 +254,7 @@ public Coupon update(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/coupons/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Coupon.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Coupon.class, options); } /** @@ -277,7 +275,7 @@ public Coupon update(CouponUpdateParams params, RequestOptions options) throws S "%s%s", Stripe.getApiBase(), String.format("/v1/coupons/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Coupon.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Coupon.class, options); } /** @@ -322,6 +320,7 @@ public Coupon delete(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/coupons/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Coupon.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Coupon.class, options); } } diff --git a/src/main/java/com/stripe/model/CouponCollection.java b/src/main/java/com/stripe/model/CouponCollection.java index 348ab768a84..4db1afd483b 100644 --- a/src/main/java/com/stripe/model/CouponCollection.java +++ b/src/main/java/com/stripe/model/CouponCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class CouponCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/CreditNote.java b/src/main/java/com/stripe/model/CreditNote.java index a50c5bbb293..6db45b4467a 100644 --- a/src/main/java/com/stripe/model/CreditNote.java +++ b/src/main/java/com/stripe/model/CreditNote.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -254,7 +252,8 @@ public static CreditNote create(Map params) throws StripeExcepti public static CreditNote create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/credit_notes"); - return request(ApiResource.RequestMethod.POST, url, params, CreditNote.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, CreditNote.class, options); } /** @@ -306,7 +305,8 @@ public static CreditNote create(CreditNoteCreateParams params) throws StripeExce public static CreditNote create(CreditNoteCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/credit_notes"); - return request(ApiResource.RequestMethod.POST, url, params, CreditNote.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, CreditNote.class, options); } /** Retrieves the credit note object with the given identifier. */ @@ -326,7 +326,8 @@ public static CreditNote retrieve(String id, Map params, Request String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/credit_notes/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, CreditNote.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, CreditNote.class, options); } /** Retrieves the credit note object with the given identifier. */ @@ -336,7 +337,8 @@ public static CreditNote retrieve( String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/credit_notes/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, CreditNote.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, CreditNote.class, options); } /** Returns a list of credit notes. */ @@ -348,7 +350,7 @@ public static CreditNoteCollection list(Map params) throws Strip public static CreditNoteCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/credit_notes"); - return requestCollection(url, params, CreditNoteCollection.class, options); + return ApiResource.requestCollection(url, params, CreditNoteCollection.class, options); } /** Returns a list of credit notes. */ @@ -360,7 +362,7 @@ public static CreditNoteCollection list(CreditNoteListParams params) throws Stri public static CreditNoteCollection list(CreditNoteListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/credit_notes"); - return requestCollection(url, params, CreditNoteCollection.class, options); + return ApiResource.requestCollection(url, params, CreditNoteCollection.class, options); } /** Updates an existing credit note. */ @@ -378,7 +380,8 @@ public CreditNote update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/credit_notes/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, CreditNote.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, CreditNote.class, options); } /** Updates an existing credit note. */ @@ -394,7 +397,8 @@ public CreditNote update(CreditNoteUpdateParams params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/credit_notes/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, CreditNote.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, CreditNote.class, options); } /** @@ -432,7 +436,8 @@ public CreditNote voidCreditNote(Map params, RequestOptions opti "%s%s", Stripe.getApiBase(), String.format("/v1/credit_notes/%s/void", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, CreditNote.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, CreditNote.class, options); } /** @@ -454,6 +459,7 @@ public CreditNote voidCreditNote(CreditNoteVoidCreditNoteParams params, RequestO "%s%s", Stripe.getApiBase(), String.format("/v1/credit_notes/%s/void", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, CreditNote.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, CreditNote.class, options); } } diff --git a/src/main/java/com/stripe/model/CreditNoteCollection.java b/src/main/java/com/stripe/model/CreditNoteCollection.java index ca7e796f8d6..4a304904bbd 100644 --- a/src/main/java/com/stripe/model/CreditNoteCollection.java +++ b/src/main/java/com/stripe/model/CreditNoteCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class CreditNoteCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Customer.java b/src/main/java/com/stripe/model/Customer.java index 09f1acdf90c..c3bba6e2b75 100644 --- a/src/main/java/com/stripe/model/Customer.java +++ b/src/main/java/com/stripe/model/Customer.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -201,7 +199,7 @@ public static CustomerCollection list(Map params) throws StripeE public static CustomerCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/customers"); - return requestCollection(url, params, CustomerCollection.class, options); + return ApiResource.requestCollection(url, params, CustomerCollection.class, options); } /** @@ -219,7 +217,7 @@ public static CustomerCollection list(CustomerListParams params) throws StripeEx public static CustomerCollection list(CustomerListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/customers"); - return requestCollection(url, params, CustomerCollection.class, options); + return ApiResource.requestCollection(url, params, CustomerCollection.class, options); } /** Creates a new customer object. */ @@ -231,7 +229,8 @@ public static Customer create(Map params) throws StripeException public static Customer create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/customers"); - return request(ApiResource.RequestMethod.POST, url, params, Customer.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Customer.class, options); } /** Creates a new customer object. */ @@ -243,7 +242,8 @@ public static Customer create(CustomerCreateParams params) throws StripeExceptio public static Customer create(CustomerCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/customers"); - return request(ApiResource.RequestMethod.POST, url, params, Customer.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Customer.class, options); } /** @@ -273,7 +273,7 @@ public static Customer retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/customers/%s", ApiResource.urlEncodeId(customer))); - return request(ApiResource.RequestMethod.GET, url, params, Customer.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Customer.class, options); } /** @@ -288,7 +288,7 @@ public static Customer retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/customers/%s", ApiResource.urlEncodeId(customer))); - return request(ApiResource.RequestMethod.GET, url, params, Customer.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Customer.class, options); } /** @@ -332,7 +332,8 @@ public Customer update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/customers/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Customer.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Customer.class, options); } /** @@ -374,7 +375,8 @@ public Customer update(CustomerUpdateParams params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/customers/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Customer.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Customer.class, options); } /** @@ -412,7 +414,8 @@ public Customer delete(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/customers/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Customer.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Customer.class, options); } /** @@ -444,7 +447,8 @@ public CustomerBalanceTransactionCollection balanceTransactions( Stripe.getApiBase(), String.format( "/v1/customers/%s/balance_transactions", ApiResource.urlEncodeId(this.getId()))); - return requestCollection(url, params, CustomerBalanceTransactionCollection.class, options); + return ApiResource.requestCollection( + url, params, CustomerBalanceTransactionCollection.class, options); } /** @@ -468,7 +472,8 @@ public CustomerBalanceTransactionCollection balanceTransactions( Stripe.getApiBase(), String.format( "/v1/customers/%s/balance_transactions", ApiResource.urlEncodeId(this.getId()))); - return requestCollection(url, params, CustomerBalanceTransactionCollection.class, options); + return ApiResource.requestCollection( + url, params, CustomerBalanceTransactionCollection.class, options); } /** Removes the currently applied discount on a customer. */ @@ -489,7 +494,8 @@ public Discount deleteDiscount(Map params, RequestOptions option "%s%s", Stripe.getApiBase(), String.format("/v1/customers/%s/discount", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Discount.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Discount.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/CustomerBalanceTransaction.java b/src/main/java/com/stripe/model/CustomerBalanceTransaction.java index dc34c86472c..7013cf2e092 100644 --- a/src/main/java/com/stripe/model/CustomerBalanceTransaction.java +++ b/src/main/java/com/stripe/model/CustomerBalanceTransaction.java @@ -1,10 +1,7 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; import com.stripe.Stripe; -import com.stripe.exception.InvalidRequestException; import com.stripe.exception.StripeException; import com.stripe.net.ApiResource; import com.stripe.net.RequestOptions; @@ -170,26 +167,15 @@ public CustomerBalanceTransaction update(Map params) throws Stri @Override public CustomerBalanceTransaction update(Map params, RequestOptions options) throws StripeException { - String url; - if (this.getCustomer() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/customers/%s/balance_transactions/%s", - ApiResource.urlEncodeId(this.getCustomer()), - ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [customer] field(s) are all null", - null, - null, - null, - 0, - null); - } - return request( + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/customers/%s/balance_transactions/%s", + ApiResource.urlEncodeId(this.getCustomer()), + ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request( ApiResource.RequestMethod.POST, url, params, CustomerBalanceTransaction.class, options); } @@ -209,26 +195,15 @@ public CustomerBalanceTransaction update(CustomerBalanceTransactionUpdateParams public CustomerBalanceTransaction update( CustomerBalanceTransactionUpdateParams params, RequestOptions options) throws StripeException { - String url; - if (this.getCustomer() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/customers/%s/balance_transactions/%s", - ApiResource.urlEncodeId(this.getCustomer()), - ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [customer] field(s) are all null", - null, - null, - null, - 0, - null); - } - return request( + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/customers/%s/balance_transactions/%s", + ApiResource.urlEncodeId(this.getCustomer()), + ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request( ApiResource.RequestMethod.POST, url, params, CustomerBalanceTransaction.class, options); } } diff --git a/src/main/java/com/stripe/model/CustomerBalanceTransactionCollection.java b/src/main/java/com/stripe/model/CustomerBalanceTransactionCollection.java index e322373312f..6f0afbccd31 100644 --- a/src/main/java/com/stripe/model/CustomerBalanceTransactionCollection.java +++ b/src/main/java/com/stripe/model/CustomerBalanceTransactionCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.stripe.Stripe; diff --git a/src/main/java/com/stripe/model/CustomerCollection.java b/src/main/java/com/stripe/model/CustomerCollection.java index d4149e542be..f063110d809 100644 --- a/src/main/java/com/stripe/model/CustomerCollection.java +++ b/src/main/java/com/stripe/model/CustomerCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class CustomerCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Discount.java b/src/main/java/com/stripe/model/Discount.java index fd40d7938f1..db15e5edc96 100644 --- a/src/main/java/com/stripe/model/Discount.java +++ b/src/main/java/com/stripe/model/Discount.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/Dispute.java b/src/main/java/com/stripe/model/Dispute.java index 7ba5f7cb1f8..b0edf28280b 100644 --- a/src/main/java/com/stripe/model/Dispute.java +++ b/src/main/java/com/stripe/model/Dispute.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -21,7 +19,7 @@ @Setter @EqualsAndHashCode(callSuper = false) public class Dispute extends ApiResource - implements BalanceTransactionSource, MetadataStore { + implements MetadataStore, BalanceTransactionSource { /** * Disputed amount. Usually the amount of the charge, but can differ (usually because of currency * fluctuation or because only part of the order is disputed). @@ -140,7 +138,7 @@ public static DisputeCollection list(Map params) throws StripeEx public static DisputeCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/disputes"); - return requestCollection(url, params, DisputeCollection.class, options); + return ApiResource.requestCollection(url, params, DisputeCollection.class, options); } /** Returns a list of your disputes. */ @@ -152,7 +150,7 @@ public static DisputeCollection list(DisputeListParams params) throws StripeExce public static DisputeCollection list(DisputeListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/disputes"); - return requestCollection(url, params, DisputeCollection.class, options); + return ApiResource.requestCollection(url, params, DisputeCollection.class, options); } /** Retrieves the dispute with the given ID. */ @@ -173,7 +171,7 @@ public static Dispute retrieve(String dispute, Map params, Reque "%s%s", Stripe.getApiBase(), String.format("/v1/disputes/%s", ApiResource.urlEncodeId(dispute))); - return request(ApiResource.RequestMethod.GET, url, params, Dispute.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Dispute.class, options); } /** Retrieves the dispute with the given ID. */ @@ -184,7 +182,7 @@ public static Dispute retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/disputes/%s", ApiResource.urlEncodeId(dispute))); - return request(ApiResource.RequestMethod.GET, url, params, Dispute.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Dispute.class, options); } /** @@ -219,7 +217,7 @@ public Dispute update(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/disputes/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); } /** @@ -252,7 +250,7 @@ public Dispute update(DisputeUpdateParams params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/disputes/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); } /** @@ -301,7 +299,7 @@ public Dispute close(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/disputes/%s/close", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); } /** @@ -328,7 +326,7 @@ public Dispute close(DisputeCloseParams params, RequestOptions options) throws S "%s%s", Stripe.getApiBase(), String.format("/v1/disputes/%s/close", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/DisputeCollection.java b/src/main/java/com/stripe/model/DisputeCollection.java index 8d53ede43b4..1d2bff5b422 100644 --- a/src/main/java/com/stripe/model/DisputeCollection.java +++ b/src/main/java/com/stripe/model/DisputeCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class DisputeCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java index 62e78431d17..7a5cd1d9afb 100644 --- a/src/main/java/com/stripe/model/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/EventDataClassLookup.java @@ -1,21 +1,5 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; -import com.stripe.model.checkout.Session; -import com.stripe.model.issuing.Authorization; -import com.stripe.model.issuing.CardDetails; -import com.stripe.model.issuing.Cardholder; -import com.stripe.model.issuing.Transaction; -import com.stripe.model.radar.EarlyFraudWarning; -import com.stripe.model.radar.ValueList; -import com.stripe.model.radar.ValueListItem; -import com.stripe.model.reporting.ReportRun; -import com.stripe.model.reporting.ReportType; -import com.stripe.model.sigma.ScheduledQueryRun; -import com.stripe.model.terminal.ConnectionToken; -import com.stripe.model.terminal.Location; -import com.stripe.model.terminal.Reader; import java.util.HashMap; import java.util.Map; @@ -41,7 +25,6 @@ final class EventDataClassLookup { classLookup.put("capability", Capability.class); classLookup.put("card", Card.class); classLookup.put("charge", Charge.class); - classLookup.put("checkout.session", Session.class); classLookup.put("connect_collection_transfer", ConnectCollectionTransfer.class); classLookup.put("country_spec", CountrySpec.class); classLookup.put("coupon", Coupon.class); @@ -59,15 +42,8 @@ final class EventDataClassLookup { classLookup.put("invoice", Invoice.class); classLookup.put("invoiceitem", InvoiceItem.class); classLookup.put("issuer_fraud_record", IssuerFraudRecord.class); - classLookup.put("issuing.authorization", Authorization.class); - classLookup.put("issuing.card", com.stripe.model.issuing.Card.class); - classLookup.put("issuing.card_details", CardDetails.class); - classLookup.put("issuing.cardholder", Cardholder.class); - classLookup.put("issuing.dispute", com.stripe.model.issuing.Dispute.class); - classLookup.put("issuing.transaction", Transaction.class); classLookup.put("line_item", InvoiceLineItem.class); classLookup.put("login_link", LoginLink.class); - classLookup.put("notification_event_data", EventData.class); classLookup.put("order", Order.class); classLookup.put("order_item", OrderItem.class); classLookup.put("order_return", OrderReturn.class); @@ -78,16 +54,10 @@ final class EventDataClassLookup { classLookup.put("plan", Plan.class); classLookup.put("platform_tax_fee", PlatformTaxFee.class); classLookup.put("product", Product.class); - classLookup.put("radar.early_fraud_warning", EarlyFraudWarning.class); - classLookup.put("radar.value_list", ValueList.class); - classLookup.put("radar.value_list_item", ValueListItem.class); classLookup.put("recipient", Recipient.class); classLookup.put("refund", Refund.class); - classLookup.put("reporting.report_run", ReportRun.class); - classLookup.put("reporting.report_type", ReportType.class); classLookup.put("reserve_transaction", ReserveTransaction.class); classLookup.put("review", Review.class); - classLookup.put("scheduled_query_run", ScheduledQueryRun.class); classLookup.put("setup_intent", SetupIntent.class); classLookup.put("sku", Sku.class); classLookup.put("source", Source.class); @@ -98,9 +68,6 @@ final class EventDataClassLookup { classLookup.put("subscription_schedule", SubscriptionSchedule.class); classLookup.put("tax_id", TaxId.class); classLookup.put("tax_rate", TaxRate.class); - classLookup.put("terminal.connection_token", ConnectionToken.class); - classLookup.put("terminal.location", Location.class); - classLookup.put("terminal.reader", Reader.class); classLookup.put("three_d_secure", ThreeDSecure.class); classLookup.put("token", Token.class); classLookup.put("topup", Topup.class); @@ -109,6 +76,28 @@ final class EventDataClassLookup { classLookup.put("usage_record", UsageRecord.class); classLookup.put("usage_record_summary", UsageRecordSummary.class); classLookup.put("webhook_endpoint", WebhookEndpoint.class); + + classLookup.put("checkout.session", com.stripe.model.checkout.Session.class); + + classLookup.put("issuing.authorization", com.stripe.model.issuing.Authorization.class); + classLookup.put("issuing.card", com.stripe.model.issuing.Card.class); + classLookup.put("issuing.card_details", com.stripe.model.issuing.CardDetails.class); + classLookup.put("issuing.cardholder", com.stripe.model.issuing.Cardholder.class); + classLookup.put("issuing.dispute", com.stripe.model.issuing.Dispute.class); + classLookup.put("issuing.transaction", com.stripe.model.issuing.Transaction.class); + + classLookup.put("radar.early_fraud_warning", com.stripe.model.radar.EarlyFraudWarning.class); + classLookup.put("radar.value_list", com.stripe.model.radar.ValueList.class); + classLookup.put("radar.value_list_item", com.stripe.model.radar.ValueListItem.class); + + classLookup.put("reporting.report_run", com.stripe.model.reporting.ReportRun.class); + classLookup.put("reporting.report_type", com.stripe.model.reporting.ReportType.class); + + classLookup.put("scheduled_query_run", com.stripe.model.sigma.ScheduledQueryRun.class); + + classLookup.put("terminal.connection_token", com.stripe.model.terminal.ConnectionToken.class); + classLookup.put("terminal.location", com.stripe.model.terminal.Location.class); + classLookup.put("terminal.reader", com.stripe.model.terminal.Reader.class); } public static Class findClass(String objectType) { diff --git a/src/main/java/com/stripe/model/ExchangeRate.java b/src/main/java/com/stripe/model/ExchangeRate.java index 7b72c59f740..4d34823af1f 100644 --- a/src/main/java/com/stripe/model/ExchangeRate.java +++ b/src/main/java/com/stripe/model/ExchangeRate.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -53,7 +51,7 @@ public static ExchangeRateCollection list(Map params) throws Str public static ExchangeRateCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/exchange_rates"); - return requestCollection(url, params, ExchangeRateCollection.class, options); + return ApiResource.requestCollection(url, params, ExchangeRateCollection.class, options); } /** @@ -71,7 +69,7 @@ public static ExchangeRateCollection list(ExchangeRateListParams params) throws public static ExchangeRateCollection list(ExchangeRateListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/exchange_rates"); - return requestCollection(url, params, ExchangeRateCollection.class, options); + return ApiResource.requestCollection(url, params, ExchangeRateCollection.class, options); } /** Retrieves the exchange rates from the given currency to every supported currency. */ @@ -93,7 +91,8 @@ public static ExchangeRate retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/exchange_rates/%s", ApiResource.urlEncodeId(currency))); - return request(ApiResource.RequestMethod.GET, url, params, ExchangeRate.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ExchangeRate.class, options); } /** Retrieves the exchange rates from the given currency to every supported currency. */ @@ -105,6 +104,7 @@ public static ExchangeRate retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/exchange_rates/%s", ApiResource.urlEncodeId(currency))); - return request(ApiResource.RequestMethod.GET, url, params, ExchangeRate.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ExchangeRate.class, options); } } diff --git a/src/main/java/com/stripe/model/ExchangeRateCollection.java b/src/main/java/com/stripe/model/ExchangeRateCollection.java index fdef96bdfc5..4f3e5464037 100644 --- a/src/main/java/com/stripe/model/ExchangeRateCollection.java +++ b/src/main/java/com/stripe/model/ExchangeRateCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class ExchangeRateCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/ExternalAccount.java b/src/main/java/com/stripe/model/ExternalAccount.java index 8f917c602be..02bd4f7551a 100644 --- a/src/main/java/com/stripe/model/ExternalAccount.java +++ b/src/main/java/com/stripe/model/ExternalAccount.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.stripe.exception.StripeException; @@ -7,15 +5,15 @@ import java.util.Map; public interface ExternalAccount extends HasId { + ExternalAccount update(Map params, RequestOptions options) throws StripeException; + ExternalAccount update(Map params) throws StripeException; - ExternalAccount update(Map params, RequestOptions options) throws StripeException; + ExternalAccount delete(Map params, RequestOptions options) throws StripeException; ExternalAccount delete() throws StripeException; ExternalAccount delete(RequestOptions options) throws StripeException; ExternalAccount delete(Map params) throws StripeException; - - ExternalAccount delete(Map params, RequestOptions options) throws StripeException; } diff --git a/src/main/java/com/stripe/model/ExternalAccountCollection.java b/src/main/java/com/stripe/model/ExternalAccountCollection.java index ea28f98a743..87ad19bfaa2 100644 --- a/src/main/java/com/stripe/model/ExternalAccountCollection.java +++ b/src/main/java/com/stripe/model/ExternalAccountCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.stripe.Stripe; diff --git a/src/main/java/com/stripe/model/ExternalAccountTypeAdapterFactory.java b/src/main/java/com/stripe/model/ExternalAccountTypeAdapterFactory.java index dacc06e75df..8fca388fb01 100644 --- a/src/main/java/com/stripe/model/ExternalAccountTypeAdapterFactory.java +++ b/src/main/java/com/stripe/model/ExternalAccountTypeAdapterFactory.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.Gson; @@ -63,15 +61,12 @@ public ExternalAccount read(JsonReader in) throws IOException { /** * Unknown subtype of {@link com.stripe.model.ExternalAccount}. If this class is the outcome of - * deserialization, please contact support@stripe.com for assistance, and provide the id and - * object value. Do not integrate with this object, but raise exception and log its content - * instead. + * deserialization, please contact support@stripe.com for assistance and provide the id and object + * value. Do not integrate with this object, but raise an exception and log its content instead. */ public static class UnknownSubType implements ExternalAccount { String id; - @Getter String object; - @Getter String rawJson; private UnknownSubType(String id, String object, String rawJson) { @@ -84,10 +79,10 @@ private UnknownSubType(String id, String object, String rawJson) { public String getId() { return this.id; } - /** Unsupported operation for unknown subtype. */ @Override - public ExternalAccount update(Map params) throws StripeException { + public ExternalAccount update(Map params, RequestOptions options) + throws StripeException { throw new UnsupportedOperationException( String.format( "Unknown subtype of ExternalAccount with id: %s, object: %s, " @@ -95,11 +90,9 @@ public ExternalAccount update(Map params) throws StripeException + "Please contact support@stripe.com for assistance.", this.id, this.object)); } - /** Unsupported operation for unknown subtype. */ @Override - public ExternalAccount update(Map params, RequestOptions options) - throws StripeException { + public ExternalAccount update(Map params) throws StripeException { throw new UnsupportedOperationException( String.format( "Unknown subtype of ExternalAccount with id: %s, object: %s, " @@ -107,10 +100,10 @@ public ExternalAccount update(Map params, RequestOptions options + "Please contact support@stripe.com for assistance.", this.id, this.object)); } - /** Unsupported operation for unknown subtype. */ @Override - public ExternalAccount delete() throws StripeException { + public ExternalAccount delete(Map params, RequestOptions options) + throws StripeException { throw new UnsupportedOperationException( String.format( "Unknown subtype of ExternalAccount with id: %s, object: %s, " @@ -118,10 +111,9 @@ public ExternalAccount delete() throws StripeException { + "Please contact support@stripe.com for assistance.", this.id, this.object)); } - /** Unsupported operation for unknown subtype. */ @Override - public ExternalAccount delete(RequestOptions options) throws StripeException { + public ExternalAccount delete() throws StripeException { throw new UnsupportedOperationException( String.format( "Unknown subtype of ExternalAccount with id: %s, object: %s, " @@ -129,10 +121,9 @@ public ExternalAccount delete(RequestOptions options) throws StripeException { + "Please contact support@stripe.com for assistance.", this.id, this.object)); } - /** Unsupported operation for unknown subtype. */ @Override - public ExternalAccount delete(Map params) throws StripeException { + public ExternalAccount delete(RequestOptions options) throws StripeException { throw new UnsupportedOperationException( String.format( "Unknown subtype of ExternalAccount with id: %s, object: %s, " @@ -140,11 +131,9 @@ public ExternalAccount delete(Map params) throws StripeException + "Please contact support@stripe.com for assistance.", this.id, this.object)); } - /** Unsupported operation for unknown subtype. */ @Override - public ExternalAccount delete(Map params, RequestOptions options) - throws StripeException { + public ExternalAccount delete(Map params) throws StripeException { throw new UnsupportedOperationException( String.format( "Unknown subtype of ExternalAccount with id: %s, object: %s, " diff --git a/src/main/java/com/stripe/model/FeeRefund.java b/src/main/java/com/stripe/model/FeeRefund.java index 7bd0edb84c9..8e042b1b1c9 100644 --- a/src/main/java/com/stripe/model/FeeRefund.java +++ b/src/main/java/com/stripe/model/FeeRefund.java @@ -1,10 +1,7 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; import com.stripe.Stripe; -import com.stripe.exception.InvalidRequestException; import com.stripe.exception.StripeException; import com.stripe.net.ApiResource; import com.stripe.net.RequestOptions; @@ -18,7 +15,7 @@ @Setter @EqualsAndHashCode(callSuper = false) public class FeeRefund extends ApiResource - implements BalanceTransactionSource, MetadataStore { + implements MetadataStore, BalanceTransactionSource { /** Amount, in %s. */ @SerializedName("amount") Long amount; @@ -120,20 +117,15 @@ public FeeRefund update(Map params) throws StripeException { @Override public FeeRefund update(Map params, RequestOptions options) throws StripeException { - String url; - if (this.getFee() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/application_fees/%s/refunds/%s", - ApiResource.urlEncodeId(this.getFee()), ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [fee] field(s) are all null", null, null, null, 0, null); - } - return request(ApiResource.RequestMethod.POST, url, params, FeeRefund.class, options); + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/application_fees/%s/refunds/%s", + ApiResource.urlEncodeId(this.getFee()), ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, FeeRefund.class, options); } /** @@ -154,19 +146,14 @@ public FeeRefund update(FeeRefundUpdateParams params) throws StripeException { */ public FeeRefund update(FeeRefundUpdateParams params, RequestOptions options) throws StripeException { - String url; - if (this.getFee() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/application_fees/%s/refunds/%s", - ApiResource.urlEncodeId(this.getFee()), ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [fee] field(s) are all null", null, null, null, 0, null); - } - return request(ApiResource.RequestMethod.POST, url, params, FeeRefund.class, options); + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/application_fees/%s/refunds/%s", + ApiResource.urlEncodeId(this.getFee()), ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, FeeRefund.class, options); } } diff --git a/src/main/java/com/stripe/model/FeeRefundCollection.java b/src/main/java/com/stripe/model/FeeRefundCollection.java index dd50e239f61..01de26b9e18 100644 --- a/src/main/java/com/stripe/model/FeeRefundCollection.java +++ b/src/main/java/com/stripe/model/FeeRefundCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.stripe.Stripe; diff --git a/src/main/java/com/stripe/model/FileLink.java b/src/main/java/com/stripe/model/FileLink.java index 821fd70566d..e95829bf746 100644 --- a/src/main/java/com/stripe/model/FileLink.java +++ b/src/main/java/com/stripe/model/FileLink.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -101,7 +99,7 @@ public static FileLink retrieve(String link, Map params, Request String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/file_links/%s", ApiResource.urlEncodeId(link))); - return request(ApiResource.RequestMethod.GET, url, params, FileLink.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, FileLink.class, options); } /** Retrieves the file link with the given ID. */ @@ -111,7 +109,7 @@ public static FileLink retrieve( String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/file_links/%s", ApiResource.urlEncodeId(link))); - return request(ApiResource.RequestMethod.GET, url, params, FileLink.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, FileLink.class, options); } /** Creates a new file link object. */ @@ -123,7 +121,8 @@ public static FileLink create(Map params) throws StripeException public static FileLink create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/file_links"); - return request(ApiResource.RequestMethod.POST, url, params, FileLink.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, FileLink.class, options); } /** Creates a new file link object. */ @@ -135,7 +134,8 @@ public static FileLink create(FileLinkCreateParams params) throws StripeExceptio public static FileLink create(FileLinkCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/file_links"); - return request(ApiResource.RequestMethod.POST, url, params, FileLink.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, FileLink.class, options); } /** Updates an existing file link object. Expired links can no longer be updated. */ @@ -153,7 +153,8 @@ public FileLink update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/file_links/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, FileLink.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, FileLink.class, options); } /** Updates an existing file link object. Expired links can no longer be updated. */ @@ -169,7 +170,8 @@ public FileLink update(FileLinkUpdateParams params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/file_links/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, FileLink.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, FileLink.class, options); } /** Returns a list of file links. */ @@ -181,7 +183,7 @@ public static FileLinkCollection list(Map params) throws StripeE public static FileLinkCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/file_links"); - return requestCollection(url, params, FileLinkCollection.class, options); + return ApiResource.requestCollection(url, params, FileLinkCollection.class, options); } /** Returns a list of file links. */ @@ -193,6 +195,6 @@ public static FileLinkCollection list(FileLinkListParams params) throws StripeEx public static FileLinkCollection list(FileLinkListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/file_links"); - return requestCollection(url, params, FileLinkCollection.class, options); + return ApiResource.requestCollection(url, params, FileLinkCollection.class, options); } } diff --git a/src/main/java/com/stripe/model/FileLinkCollection.java b/src/main/java/com/stripe/model/FileLinkCollection.java index d03f5fd2e07..52b412d8467 100644 --- a/src/main/java/com/stripe/model/FileLinkCollection.java +++ b/src/main/java/com/stripe/model/FileLinkCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class FileLinkCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 9bbf53ae1be..b830df2096c 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -138,7 +136,7 @@ public class Invoice extends ApiResource implements HasId, MetadataStore customFields; + List customFields; @SerializedName("customer") @Getter(lombok.AccessLevel.NONE) @@ -192,7 +190,7 @@ public class Invoice extends ApiResource implements HasId, MetadataStore customerTaxIds; + List customerTaxIds; /** * ID of the default payment method for the invoice. It must belong to the customer associated @@ -408,7 +406,7 @@ public class Invoice extends ApiResource implements HasId, MetadataStore totalTaxAmounts; + List totalTaxAmounts; /** * If specified, the funds from the invoice will be transferred to the destination and the ID of @@ -552,7 +550,7 @@ public static InvoiceCollection list(Map params) throws StripeEx public static InvoiceCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/invoices"); - return requestCollection(url, params, InvoiceCollection.class, options); + return ApiResource.requestCollection(url, params, InvoiceCollection.class, options); } /** @@ -570,7 +568,7 @@ public static InvoiceCollection list(InvoiceListParams params) throws StripeExce public static InvoiceCollection list(InvoiceListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/invoices"); - return requestCollection(url, params, InvoiceCollection.class, options); + return ApiResource.requestCollection(url, params, InvoiceCollection.class, options); } /** @@ -644,7 +642,7 @@ public static Invoice upcoming(Map params) throws StripeExceptio public static Invoice upcoming(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/invoices/upcoming"); - return request(ApiResource.RequestMethod.GET, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Invoice.class, options); } /** @@ -694,7 +692,7 @@ public static Invoice upcoming(InvoiceUpcomingParams params) throws StripeExcept public static Invoice upcoming(InvoiceUpcomingParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/invoices/upcoming"); - return request(ApiResource.RequestMethod.GET, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Invoice.class, options); } /** @@ -712,7 +710,7 @@ public static Invoice create(Map params) throws StripeException public static Invoice create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/invoices"); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } /** @@ -730,7 +728,7 @@ public static Invoice create(InvoiceCreateParams params) throws StripeException public static Invoice create(InvoiceCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/invoices"); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } /** Retrieves the invoice with the given ID. */ @@ -751,7 +749,7 @@ public static Invoice retrieve(String invoice, Map params, Reque "%s%s", Stripe.getApiBase(), String.format("/v1/invoices/%s", ApiResource.urlEncodeId(invoice))); - return request(ApiResource.RequestMethod.GET, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Invoice.class, options); } /** Retrieves the invoice with the given ID. */ @@ -762,7 +760,7 @@ public static Invoice retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/invoices/%s", ApiResource.urlEncodeId(invoice))); - return request(ApiResource.RequestMethod.GET, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Invoice.class, options); } /** @@ -797,7 +795,7 @@ public Invoice update(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/invoices/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } /** @@ -830,7 +828,7 @@ public Invoice update(InvoiceUpdateParams params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/invoices/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } /** @@ -871,7 +869,8 @@ public Invoice delete(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/invoices/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Invoice.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Invoice.class, options); } /** @@ -920,7 +919,7 @@ public Invoice pay(Map params, RequestOptions options) throws St "%s%s", Stripe.getApiBase(), String.format("/v1/invoices/%s/pay", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } /** @@ -947,7 +946,7 @@ public Invoice pay(InvoicePayParams params, RequestOptions options) throws Strip "%s%s", Stripe.getApiBase(), String.format("/v1/invoices/%s/pay", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } /** @@ -985,7 +984,7 @@ public Invoice finalizeInvoice(Map params, RequestOptions option "%s%s", Stripe.getApiBase(), String.format("/v1/invoices/%s/finalize", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } /** @@ -1007,7 +1006,7 @@ public Invoice finalizeInvoice(InvoiceFinalizeInvoiceParams params, RequestOptio "%s%s", Stripe.getApiBase(), String.format("/v1/invoices/%s/finalize", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } /** @@ -1069,7 +1068,7 @@ public Invoice sendInvoice(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/invoices/%s/send", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } /** @@ -1103,7 +1102,7 @@ public Invoice sendInvoice(InvoiceSendInvoiceParams params, RequestOptions optio "%s%s", Stripe.getApiBase(), String.format("/v1/invoices/%s/send", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } /** @@ -1142,7 +1141,7 @@ public Invoice markUncollectible(Map params, RequestOptions opti Stripe.getApiBase(), String.format( "/v1/invoices/%s/mark_uncollectible", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } /** @@ -1165,7 +1164,7 @@ public Invoice markUncollectible(InvoiceMarkUncollectibleParams params, RequestO Stripe.getApiBase(), String.format( "/v1/invoices/%s/mark_uncollectible", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } /** @@ -1207,7 +1206,7 @@ public Invoice voidInvoice(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/invoices/%s/void", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } /** @@ -1231,7 +1230,7 @@ public Invoice voidInvoice(InvoiceVoidInvoiceParams params, RequestOptions optio "%s%s", Stripe.getApiBase(), String.format("/v1/invoices/%s/void", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Invoice.class, options); } @Getter @@ -1344,7 +1343,7 @@ public static class ThresholdReason extends StripeObject { /** Indicates which line items triggered a threshold invoice. */ @SerializedName("item_reasons") - List itemReasons; + List itemReasons; } @Getter diff --git a/src/main/java/com/stripe/model/InvoiceCollection.java b/src/main/java/com/stripe/model/InvoiceCollection.java index cc27f9c27d9..fa61ab1a01a 100644 --- a/src/main/java/com/stripe/model/InvoiceCollection.java +++ b/src/main/java/com/stripe/model/InvoiceCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class InvoiceCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/InvoiceItem.java b/src/main/java/com/stripe/model/InvoiceItem.java index 52d79c106ab..f09ff2e9552 100644 --- a/src/main/java/com/stripe/model/InvoiceItem.java +++ b/src/main/java/com/stripe/model/InvoiceItem.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -42,6 +40,7 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStore customer; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @SerializedName("date") Long date; @@ -117,6 +116,7 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStore subscription; + /** The subscription item that this invoice item has been created for, if any. */ @SerializedName("subscription_item") String subscriptionItem; @@ -212,7 +212,7 @@ public static InvoiceItemCollection list(Map params) throws Stri public static InvoiceItemCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/invoiceitems"); - return requestCollection(url, params, InvoiceItemCollection.class, options); + return ApiResource.requestCollection(url, params, InvoiceItemCollection.class, options); } /** @@ -230,7 +230,7 @@ public static InvoiceItemCollection list(InvoiceItemListParams params) throws St public static InvoiceItemCollection list(InvoiceItemListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/invoiceitems"); - return requestCollection(url, params, InvoiceItemCollection.class, options); + return ApiResource.requestCollection(url, params, InvoiceItemCollection.class, options); } /** @@ -248,7 +248,8 @@ public static InvoiceItem create(Map params) throws StripeExcept public static InvoiceItem create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/invoiceitems"); - return request(ApiResource.RequestMethod.POST, url, params, InvoiceItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, InvoiceItem.class, options); } /** @@ -266,7 +267,8 @@ public static InvoiceItem create(InvoiceItemCreateParams params) throws StripeEx public static InvoiceItem create(InvoiceItemCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/invoiceitems"); - return request(ApiResource.RequestMethod.POST, url, params, InvoiceItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, InvoiceItem.class, options); } /** Retrieves the invoice item with the given ID. */ @@ -289,7 +291,8 @@ public static InvoiceItem retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/invoiceitems/%s", ApiResource.urlEncodeId(invoiceitem))); - return request(ApiResource.RequestMethod.GET, url, params, InvoiceItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, InvoiceItem.class, options); } /** Retrieves the invoice item with the given ID. */ @@ -301,7 +304,8 @@ public static InvoiceItem retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/invoiceitems/%s", ApiResource.urlEncodeId(invoiceitem))); - return request(ApiResource.RequestMethod.GET, url, params, InvoiceItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, InvoiceItem.class, options); } /** @@ -325,7 +329,8 @@ public InvoiceItem update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/invoiceitems/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, InvoiceItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, InvoiceItem.class, options); } /** @@ -347,7 +352,8 @@ public InvoiceItem update(InvoiceItemUpdateParams params, RequestOptions options "%s%s", Stripe.getApiBase(), String.format("/v1/invoiceitems/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, InvoiceItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, InvoiceItem.class, options); } /** @@ -385,6 +391,7 @@ public InvoiceItem delete(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/invoiceitems/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, InvoiceItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, InvoiceItem.class, options); } } diff --git a/src/main/java/com/stripe/model/InvoiceItemCollection.java b/src/main/java/com/stripe/model/InvoiceItemCollection.java index ce36eba7b14..019086a1db3 100644 --- a/src/main/java/com/stripe/model/InvoiceItemCollection.java +++ b/src/main/java/com/stripe/model/InvoiceItemCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class InvoiceItemCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/InvoiceLineItem.java b/src/main/java/com/stripe/model/InvoiceLineItem.java index 70decb1fa8e..063cec46160 100644 --- a/src/main/java/com/stripe/model/InvoiceLineItem.java +++ b/src/main/java/com/stripe/model/InvoiceLineItem.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/InvoiceLineItemCollection.java b/src/main/java/com/stripe/model/InvoiceLineItemCollection.java index 8183941bab5..933b5355350 100644 --- a/src/main/java/com/stripe/model/InvoiceLineItemCollection.java +++ b/src/main/java/com/stripe/model/InvoiceLineItemCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.stripe.Stripe; diff --git a/src/main/java/com/stripe/model/InvoiceLineItemPeriod.java b/src/main/java/com/stripe/model/InvoiceLineItemPeriod.java index 2c600355479..78ff67e9a65 100644 --- a/src/main/java/com/stripe/model/InvoiceLineItemPeriod.java +++ b/src/main/java/com/stripe/model/InvoiceLineItemPeriod.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/IssuerFraudRecord.java b/src/main/java/com/stripe/model/IssuerFraudRecord.java index 558f5456e27..87feb76bef7 100644 --- a/src/main/java/com/stripe/model/IssuerFraudRecord.java +++ b/src/main/java/com/stripe/model/IssuerFraudRecord.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -99,7 +97,7 @@ public static IssuerFraudRecordCollection list(Map params) public static IssuerFraudRecordCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuer_fraud_records"); - return requestCollection(url, params, IssuerFraudRecordCollection.class, options); + return ApiResource.requestCollection(url, params, IssuerFraudRecordCollection.class, options); } /** Returns a list of issuer fraud records. */ @@ -112,7 +110,7 @@ public static IssuerFraudRecordCollection list(IssuerFraudRecordListParams param public static IssuerFraudRecordCollection list( IssuerFraudRecordListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuer_fraud_records"); - return requestCollection(url, params, IssuerFraudRecordCollection.class, options); + return ApiResource.requestCollection(url, params, IssuerFraudRecordCollection.class, options); } /** @@ -151,7 +149,8 @@ public static IssuerFraudRecord retrieve( Stripe.getApiBase(), String.format( "/v1/issuer_fraud_records/%s", ApiResource.urlEncodeId(issuerFraudRecord))); - return request(ApiResource.RequestMethod.GET, url, params, IssuerFraudRecord.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, IssuerFraudRecord.class, options); } /** @@ -169,6 +168,7 @@ public static IssuerFraudRecord retrieve( Stripe.getApiBase(), String.format( "/v1/issuer_fraud_records/%s", ApiResource.urlEncodeId(issuerFraudRecord))); - return request(ApiResource.RequestMethod.GET, url, params, IssuerFraudRecord.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, IssuerFraudRecord.class, options); } } diff --git a/src/main/java/com/stripe/model/IssuerFraudRecordCollection.java b/src/main/java/com/stripe/model/IssuerFraudRecordCollection.java index 6a093d85283..3710b25af11 100644 --- a/src/main/java/com/stripe/model/IssuerFraudRecordCollection.java +++ b/src/main/java/com/stripe/model/IssuerFraudRecordCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class IssuerFraudRecordCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/LoginLink.java b/src/main/java/com/stripe/model/LoginLink.java index 143a2e05928..73f9c9b80cd 100644 --- a/src/main/java/com/stripe/model/LoginLink.java +++ b/src/main/java/com/stripe/model/LoginLink.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -42,7 +40,8 @@ public static LoginLink createOnAccount( "%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s/login_links", ApiResource.urlEncodeId(account))); - return request(ApiResource.RequestMethod.POST, url, params, LoginLink.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, LoginLink.class, options); } /** @@ -59,6 +58,7 @@ public static LoginLink createOnAccount( "%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s/login_links", ApiResource.urlEncodeId(account))); - return request(ApiResource.RequestMethod.POST, url, params, LoginLink.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, LoginLink.class, options); } } diff --git a/src/main/java/com/stripe/model/Order.java b/src/main/java/com/stripe/model/Order.java index 207ae577651..4b8998e6d91 100644 --- a/src/main/java/com/stripe/model/Order.java +++ b/src/main/java/com/stripe/model/Order.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -122,7 +120,7 @@ public class Order extends ApiResource implements HasId, MetadataStore { * specified either by updating the order, or when paying it. */ @SerializedName("shipping_methods") - List shippingMethods; + List shippingMethods; /** * Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More @@ -188,7 +186,7 @@ public static Order create(Map params) throws StripeException { public static Order create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/orders"); - return request(ApiResource.RequestMethod.POST, url, params, Order.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Order.class, options); } /** Creates a new order object. */ @@ -200,7 +198,7 @@ public static Order create(OrderCreateParams params) throws StripeException { public static Order create(OrderCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/orders"); - return request(ApiResource.RequestMethod.POST, url, params, Order.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Order.class, options); } /** @@ -218,7 +216,7 @@ public static OrderCollection list(Map params) throws StripeExce public static OrderCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/orders"); - return requestCollection(url, params, OrderCollection.class, options); + return ApiResource.requestCollection(url, params, OrderCollection.class, options); } /** @@ -236,7 +234,7 @@ public static OrderCollection list(OrderListParams params) throws StripeExceptio public static OrderCollection list(OrderListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/orders"); - return requestCollection(url, params, OrderCollection.class, options); + return ApiResource.requestCollection(url, params, OrderCollection.class, options); } /** @@ -265,7 +263,7 @@ public static Order retrieve(String id, Map params, RequestOptio String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/orders/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, Order.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Order.class, options); } /** @@ -278,7 +276,7 @@ public static Order retrieve(String id, OrderRetrieveParams params, RequestOptio String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/orders/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, Order.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Order.class, options); } /** @@ -301,7 +299,7 @@ public Order update(Map params, RequestOptions options) throws S "%s%s", Stripe.getApiBase(), String.format("/v1/orders/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Order.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Order.class, options); } /** @@ -322,7 +320,7 @@ public Order update(OrderUpdateParams params, RequestOptions options) throws Str "%s%s", Stripe.getApiBase(), String.format("/v1/orders/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Order.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Order.class, options); } /** Pay an order by providing a source to create a payment. */ @@ -347,7 +345,7 @@ public Order pay(Map params, RequestOptions options) throws Stri "%s%s", Stripe.getApiBase(), String.format("/v1/orders/%s/pay", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Order.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Order.class, options); } /** Pay an order by providing a source to create a payment. */ @@ -362,7 +360,7 @@ public Order pay(OrderPayParams params, RequestOptions options) throws StripeExc "%s%s", Stripe.getApiBase(), String.format("/v1/orders/%s/pay", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Order.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Order.class, options); } /** @@ -408,7 +406,8 @@ public OrderReturn returnOrder(Map params, RequestOptions option "%s%s", Stripe.getApiBase(), String.format("/v1/orders/%s/returns", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, OrderReturn.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, OrderReturn.class, options); } /** @@ -434,7 +433,8 @@ public OrderReturn returnOrder(OrderReturnOrderParams params, RequestOptions opt "%s%s", Stripe.getApiBase(), String.format("/v1/orders/%s/returns", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, OrderReturn.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, OrderReturn.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/OrderCollection.java b/src/main/java/com/stripe/model/OrderCollection.java index 4774e8267ae..550d0877ea9 100644 --- a/src/main/java/com/stripe/model/OrderCollection.java +++ b/src/main/java/com/stripe/model/OrderCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class OrderCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/OrderItem.java b/src/main/java/com/stripe/model/OrderItem.java index 203f44cd36b..8182630eb1c 100644 --- a/src/main/java/com/stripe/model/OrderItem.java +++ b/src/main/java/com/stripe/model/OrderItem.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/OrderReturn.java b/src/main/java/com/stripe/model/OrderReturn.java index dfec35eb1d4..f5b7f14a47f 100644 --- a/src/main/java/com/stripe/model/OrderReturn.java +++ b/src/main/java/com/stripe/model/OrderReturn.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -121,7 +119,7 @@ public static OrderReturnCollection list(Map params) throws Stri public static OrderReturnCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/order_returns"); - return requestCollection(url, params, OrderReturnCollection.class, options); + return ApiResource.requestCollection(url, params, OrderReturnCollection.class, options); } /** @@ -139,7 +137,7 @@ public static OrderReturnCollection list(OrderReturnListParams params) throws St public static OrderReturnCollection list(OrderReturnListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/order_returns"); - return requestCollection(url, params, OrderReturnCollection.class, options); + return ApiResource.requestCollection(url, params, OrderReturnCollection.class, options); } /** @@ -172,7 +170,8 @@ public static OrderReturn retrieve(String id, Map params, Reques "%s%s", Stripe.getApiBase(), String.format("/v1/order_returns/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, OrderReturn.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, OrderReturn.class, options); } /** @@ -187,6 +186,7 @@ public static OrderReturn retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/order_returns/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, OrderReturn.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, OrderReturn.class, options); } } diff --git a/src/main/java/com/stripe/model/OrderReturnCollection.java b/src/main/java/com/stripe/model/OrderReturnCollection.java index 803fb7c2bfe..5c901aa19b6 100644 --- a/src/main/java/com/stripe/model/OrderReturnCollection.java +++ b/src/main/java/com/stripe/model/OrderReturnCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class OrderReturnCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/PackageDimensions.java b/src/main/java/com/stripe/model/PackageDimensions.java index 4643edca5bb..29eba4a9e8a 100644 --- a/src/main/java/com/stripe/model/PackageDimensions.java +++ b/src/main/java/com/stripe/model/PackageDimensions.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 5f90a7446a5..08f45a453e5 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -457,7 +455,8 @@ public static PaymentIntent create(Map params) throws StripeExce public static PaymentIntent create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/payment_intents"); - return request(ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); } /** @@ -493,7 +492,8 @@ public static PaymentIntent create(PaymentIntentCreateParams params) throws Stri public static PaymentIntent create(PaymentIntentCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/payment_intents"); - return request(ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); } /** Returns a list of PaymentIntents. */ @@ -505,7 +505,7 @@ public static PaymentIntentCollection list(Map params) throws St public static PaymentIntentCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/payment_intents"); - return requestCollection(url, params, PaymentIntentCollection.class, options); + return ApiResource.requestCollection(url, params, PaymentIntentCollection.class, options); } /** Returns a list of PaymentIntents. */ @@ -518,7 +518,7 @@ public static PaymentIntentCollection list(PaymentIntentListParams params) public static PaymentIntentCollection list(PaymentIntentListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/payment_intents"); - return requestCollection(url, params, PaymentIntentCollection.class, options); + return ApiResource.requestCollection(url, params, PaymentIntentCollection.class, options); } /** @@ -567,7 +567,8 @@ public static PaymentIntent retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/payment_intents/%s", ApiResource.urlEncodeId(intent))); - return request(ApiResource.RequestMethod.GET, url, params, PaymentIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, PaymentIntent.class, options); } /** @@ -588,7 +589,8 @@ public static PaymentIntent retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/payment_intents/%s", ApiResource.urlEncodeId(intent))); - return request(ApiResource.RequestMethod.GET, url, params, PaymentIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, PaymentIntent.class, options); } /** @@ -622,7 +624,8 @@ public PaymentIntent update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/payment_intents/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); } /** @@ -654,7 +657,8 @@ public PaymentIntent update(PaymentIntentUpdateParams params, RequestOptions opt "%s%s", Stripe.getApiBase(), String.format("/v1/payment_intents/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); } /** @@ -776,7 +780,8 @@ public PaymentIntent confirm(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/payment_intents/%s/confirm", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); } /** @@ -840,7 +845,8 @@ public PaymentIntent confirm(PaymentIntentConfirmParams params, RequestOptions o "%s%s", Stripe.getApiBase(), String.format("/v1/payment_intents/%s/confirm", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); } /** @@ -902,7 +908,8 @@ public PaymentIntent cancel(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/payment_intents/%s/cancel", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); } /** @@ -936,7 +943,8 @@ public PaymentIntent cancel(PaymentIntentCancelParams params, RequestOptions opt "%s%s", Stripe.getApiBase(), String.format("/v1/payment_intents/%s/cancel", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); } /** @@ -998,7 +1006,8 @@ public PaymentIntent capture(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/payment_intents/%s/capture", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); } /** @@ -1032,7 +1041,8 @@ public PaymentIntent capture(PaymentIntentCaptureParams params, RequestOptions o "%s%s", Stripe.getApiBase(), String.format("/v1/payment_intents/%s/capture", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentIntent.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/PaymentIntentCollection.java b/src/main/java/com/stripe/model/PaymentIntentCollection.java index b2eeede819a..22ec8af95fb 100644 --- a/src/main/java/com/stripe/model/PaymentIntentCollection.java +++ b/src/main/java/com/stripe/model/PaymentIntentCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class PaymentIntentCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index 216801e108d..993f1c9e554 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -110,7 +108,8 @@ public static PaymentMethod create(Map params) throws StripeExce public static PaymentMethod create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/payment_methods"); - return request(ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); } /** @@ -130,7 +129,8 @@ public static PaymentMethod create(PaymentMethodCreateParams params) throws Stri public static PaymentMethod create(PaymentMethodCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/payment_methods"); - return request(ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); } /** Retrieves a PaymentMethod object. */ @@ -153,7 +153,8 @@ public static PaymentMethod retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/payment_methods/%s", ApiResource.urlEncodeId(paymentMethod))); - return request(ApiResource.RequestMethod.GET, url, params, PaymentMethod.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, PaymentMethod.class, options); } /** Retrieves a PaymentMethod object. */ @@ -165,7 +166,8 @@ public static PaymentMethod retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/payment_methods/%s", ApiResource.urlEncodeId(paymentMethod))); - return request(ApiResource.RequestMethod.GET, url, params, PaymentMethod.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, PaymentMethod.class, options); } /** Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. */ @@ -183,7 +185,8 @@ public PaymentMethod update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/payment_methods/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); } /** Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. */ @@ -199,7 +202,8 @@ public PaymentMethod update(PaymentMethodUpdateParams params, RequestOptions opt "%s%s", Stripe.getApiBase(), String.format("/v1/payment_methods/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); } /** Returns a list of PaymentMethods for a given Customer. */ @@ -211,7 +215,7 @@ public static PaymentMethodCollection list(Map params) throws St public static PaymentMethodCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/payment_methods"); - return requestCollection(url, params, PaymentMethodCollection.class, options); + return ApiResource.requestCollection(url, params, PaymentMethodCollection.class, options); } /** Returns a list of PaymentMethods for a given Customer. */ @@ -224,7 +228,7 @@ public static PaymentMethodCollection list(PaymentMethodListParams params) public static PaymentMethodCollection list(PaymentMethodListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/payment_methods"); - return requestCollection(url, params, PaymentMethodCollection.class, options); + return ApiResource.requestCollection(url, params, PaymentMethodCollection.class, options); } /** @@ -254,7 +258,8 @@ public PaymentMethod attach(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/payment_methods/%s/attach", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); } /** @@ -284,7 +289,8 @@ public PaymentMethod attach(PaymentMethodAttachParams params, RequestOptions opt "%s%s", Stripe.getApiBase(), String.format("/v1/payment_methods/%s/attach", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); } /** Detaches a PaymentMethod object from a Customer. */ @@ -310,7 +316,8 @@ public PaymentMethod detach(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/payment_methods/%s/detach", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); } /** Detaches a PaymentMethod object from a Customer. */ @@ -326,7 +333,8 @@ public PaymentMethod detach(PaymentMethodDetachParams params, RequestOptions opt "%s%s", Stripe.getApiBase(), String.format("/v1/payment_methods/%s/detach", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, PaymentMethod.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/PaymentMethodCollection.java b/src/main/java/com/stripe/model/PaymentMethodCollection.java index 4eab4d269df..fb9ac23dc34 100644 --- a/src/main/java/com/stripe/model/PaymentMethodCollection.java +++ b/src/main/java/com/stripe/model/PaymentMethodCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class PaymentMethodCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/PaymentSource.java b/src/main/java/com/stripe/model/PaymentSource.java index ca4f1f30f2b..bdb54ecb645 100644 --- a/src/main/java/com/stripe/model/PaymentSource.java +++ b/src/main/java/com/stripe/model/PaymentSource.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public interface PaymentSource extends HasId {} diff --git a/src/main/java/com/stripe/model/PaymentSourceCollection.java b/src/main/java/com/stripe/model/PaymentSourceCollection.java index 01a4f794599..874a12910a1 100644 --- a/src/main/java/com/stripe/model/PaymentSourceCollection.java +++ b/src/main/java/com/stripe/model/PaymentSourceCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.stripe.Stripe; diff --git a/src/main/java/com/stripe/model/PaymentSourceTypeAdapterFactory.java b/src/main/java/com/stripe/model/PaymentSourceTypeAdapterFactory.java index 44221574518..f9083c83dfe 100644 --- a/src/main/java/com/stripe/model/PaymentSourceTypeAdapterFactory.java +++ b/src/main/java/com/stripe/model/PaymentSourceTypeAdapterFactory.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.Gson; @@ -76,15 +74,12 @@ public PaymentSource read(JsonReader in) throws IOException { /** * Unknown subtype of {@link com.stripe.model.PaymentSource}. If this class is the outcome of - * deserialization, please contact support@stripe.com for assistance, and provide the id and - * object value. Do not integrate with this object, but raise exception and log its content - * instead. + * deserialization, please contact support@stripe.com for assistance and provide the id and object + * value. Do not integrate with this object, but raise an exception and log its content instead. */ public static class UnknownSubType implements PaymentSource { String id; - @Getter String object; - @Getter String rawJson; private UnknownSubType(String id, String object, String rawJson) { diff --git a/src/main/java/com/stripe/model/Payout.java b/src/main/java/com/stripe/model/Payout.java index e8678399927..28b3c3ffbdf 100644 --- a/src/main/java/com/stripe/model/Payout.java +++ b/src/main/java/com/stripe/model/Payout.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -20,7 +18,7 @@ @Getter @Setter @EqualsAndHashCode(callSuper = false) -public class Payout extends ApiResource implements BalanceTransactionSource, MetadataStore { +public class Payout extends ApiResource implements MetadataStore, BalanceTransactionSource { /** Amount (in %s) to be transferred to your bank account or debit card. */ @SerializedName("amount") Long amount; @@ -232,7 +230,7 @@ public static Payout retrieve(String payout, Map params, Request String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/payouts/%s", ApiResource.urlEncodeId(payout))); - return request(ApiResource.RequestMethod.GET, url, params, Payout.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Payout.class, options); } /** @@ -246,7 +244,7 @@ public static Payout retrieve(String payout, PayoutRetrieveParams params, Reques String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/payouts/%s", ApiResource.urlEncodeId(payout))); - return request(ApiResource.RequestMethod.GET, url, params, Payout.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Payout.class, options); } /** @@ -266,7 +264,7 @@ public static PayoutCollection list(Map params) throws StripeExc public static PayoutCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/payouts"); - return requestCollection(url, params, PayoutCollection.class, options); + return ApiResource.requestCollection(url, params, PayoutCollection.class, options); } /** @@ -286,7 +284,7 @@ public static PayoutCollection list(PayoutListParams params) throws StripeExcept public static PayoutCollection list(PayoutListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/payouts"); - return requestCollection(url, params, PayoutCollection.class, options); + return ApiResource.requestCollection(url, params, PayoutCollection.class, options); } /** @@ -320,7 +318,7 @@ public static Payout create(Map params) throws StripeException { public static Payout create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/payouts"); - return request(ApiResource.RequestMethod.POST, url, params, Payout.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Payout.class, options); } /** @@ -354,7 +352,7 @@ public static Payout create(PayoutCreateParams params) throws StripeException { public static Payout create(PayoutCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/payouts"); - return request(ApiResource.RequestMethod.POST, url, params, Payout.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Payout.class, options); } /** @@ -377,7 +375,7 @@ public Payout update(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/payouts/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Payout.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Payout.class, options); } /** @@ -398,7 +396,7 @@ public Payout update(PayoutUpdateParams params, RequestOptions options) throws S "%s%s", Stripe.getApiBase(), String.format("/v1/payouts/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Payout.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Payout.class, options); } /** @@ -435,7 +433,7 @@ public Payout cancel(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/payouts/%s/cancel", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Payout.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Payout.class, options); } /** @@ -456,6 +454,6 @@ public Payout cancel(PayoutCancelParams params, RequestOptions options) throws S "%s%s", Stripe.getApiBase(), String.format("/v1/payouts/%s/cancel", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Payout.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Payout.class, options); } } diff --git a/src/main/java/com/stripe/model/PayoutCollection.java b/src/main/java/com/stripe/model/PayoutCollection.java index 3dd5727eebd..9b1d4debac6 100644 --- a/src/main/java/com/stripe/model/PayoutCollection.java +++ b/src/main/java/com/stripe/model/PayoutCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class PayoutCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Person.java b/src/main/java/com/stripe/model/Person.java index e4ca0883188..8048abc4464 100644 --- a/src/main/java/com/stripe/model/Person.java +++ b/src/main/java/com/stripe/model/Person.java @@ -1,10 +1,7 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; import com.stripe.Stripe; -import com.stripe.exception.InvalidRequestException; import com.stripe.exception.StripeException; import com.stripe.net.ApiResource; import com.stripe.net.RequestOptions; @@ -133,26 +130,14 @@ public Person update(Map params) throws StripeException { /** Updates an existing person. */ @Override public Person update(Map params, RequestOptions options) throws StripeException { - String url; - if (this.getAccount() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/accounts/%s/persons/%s", - ApiResource.urlEncodeId(this.getAccount()), - ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [account] field(s) are all null", - null, - null, - null, - 0, - null); - } - return request(ApiResource.RequestMethod.POST, url, params, Person.class, options); + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/accounts/%s/persons/%s", + ApiResource.urlEncodeId(this.getAccount()), ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Person.class, options); } /** Updates an existing person. */ @@ -162,26 +147,14 @@ public Person update(PersonUpdateParams params) throws StripeException { /** Updates an existing person. */ public Person update(PersonUpdateParams params, RequestOptions options) throws StripeException { - String url; - if (this.getAccount() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/accounts/%s/persons/%s", - ApiResource.urlEncodeId(this.getAccount()), - ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [account] field(s) are all null", - null, - null, - null, - 0, - null); - } - return request(ApiResource.RequestMethod.POST, url, params, Person.class, options); + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/accounts/%s/persons/%s", + ApiResource.urlEncodeId(this.getAccount()), ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Person.class, options); } /** @@ -221,26 +194,15 @@ public Person delete(Map params) throws StripeException { * cannot delete the only verified executive on file. */ public Person delete(Map params, RequestOptions options) throws StripeException { - String url; - if (this.getAccount() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/accounts/%s/persons/%s", - ApiResource.urlEncodeId(this.getAccount()), - ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [account] field(s) are all null", - null, - null, - null, - 0, - null); - } - return request(ApiResource.RequestMethod.DELETE, url, params, Person.class, options); + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/accounts/%s/persons/%s", + ApiResource.urlEncodeId(this.getAccount()), ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Person.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/PersonCollection.java b/src/main/java/com/stripe/model/PersonCollection.java index b99975916ee..8eccdc42129 100644 --- a/src/main/java/com/stripe/model/PersonCollection.java +++ b/src/main/java/com/stripe/model/PersonCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.stripe.Stripe; diff --git a/src/main/java/com/stripe/model/Plan.java b/src/main/java/com/stripe/model/Plan.java index c45ad1ab078..ff1e3f8c0cc 100644 --- a/src/main/java/com/stripe/model/Plan.java +++ b/src/main/java/com/stripe/model/Plan.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -122,7 +120,7 @@ public class Plan extends ApiResource implements HasId, MetadataStore { * `tiered`. See also the documentation for `billing_scheme`. */ @SerializedName("tiers") - List tiers; + List tiers; /** * Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based @@ -182,7 +180,7 @@ public static PlanCollection list(Map params) throws StripeExcep public static PlanCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/plans"); - return requestCollection(url, params, PlanCollection.class, options); + return ApiResource.requestCollection(url, params, PlanCollection.class, options); } /** Returns a list of your plans. */ @@ -194,7 +192,7 @@ public static PlanCollection list(PlanListParams params) throws StripeException public static PlanCollection list(PlanListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/plans"); - return requestCollection(url, params, PlanCollection.class, options); + return ApiResource.requestCollection(url, params, PlanCollection.class, options); } /** @@ -212,7 +210,7 @@ public static Plan create(Map params) throws StripeException { public static Plan create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/plans"); - return request(ApiResource.RequestMethod.POST, url, params, Plan.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Plan.class, options); } /** @@ -230,7 +228,7 @@ public static Plan create(PlanCreateParams params) throws StripeException { public static Plan create(PlanCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/plans"); - return request(ApiResource.RequestMethod.POST, url, params, Plan.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Plan.class, options); } /** Retrieves the plan with the given ID. */ @@ -250,7 +248,7 @@ public static Plan retrieve(String plan, Map params, RequestOpti String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/plans/%s", ApiResource.urlEncodeId(plan))); - return request(ApiResource.RequestMethod.GET, url, params, Plan.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Plan.class, options); } /** Retrieves the plan with the given ID. */ @@ -260,7 +258,7 @@ public static Plan retrieve(String plan, PlanRetrieveParams params, RequestOptio String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/plans/%s", ApiResource.urlEncodeId(plan))); - return request(ApiResource.RequestMethod.GET, url, params, Plan.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Plan.class, options); } /** @@ -285,7 +283,7 @@ public Plan update(Map params, RequestOptions options) throws St "%s%s", Stripe.getApiBase(), String.format("/v1/plans/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Plan.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Plan.class, options); } /** @@ -308,7 +306,7 @@ public Plan update(PlanUpdateParams params, RequestOptions options) throws Strip "%s%s", Stripe.getApiBase(), String.format("/v1/plans/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Plan.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Plan.class, options); } /** Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected. */ @@ -333,7 +331,7 @@ public Plan delete(Map params, RequestOptions options) throws St "%s%s", Stripe.getApiBase(), String.format("/v1/plans/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Plan.class, options); + return ApiResource.request(ApiResource.RequestMethod.DELETE, url, params, Plan.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/PlanCollection.java b/src/main/java/com/stripe/model/PlanCollection.java index 3d84feaf3b0..394489dee47 100644 --- a/src/main/java/com/stripe/model/PlanCollection.java +++ b/src/main/java/com/stripe/model/PlanCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class PlanCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/PlatformTaxFee.java b/src/main/java/com/stripe/model/PlatformTaxFee.java index 424052f3896..66092b97258 100644 --- a/src/main/java/com/stripe/model/PlatformTaxFee.java +++ b/src/main/java/com/stripe/model/PlatformTaxFee.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/Product.java b/src/main/java/com/stripe/model/Product.java index b696b0eac3d..cf801610a64 100644 --- a/src/main/java/com/stripe/model/Product.java +++ b/src/main/java/com/stripe/model/Product.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -158,7 +156,7 @@ public static Product create(Map params) throws StripeException public static Product create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/products"); - return request(ApiResource.RequestMethod.POST, url, params, Product.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Product.class, options); } /** @@ -176,7 +174,7 @@ public static Product create(ProductCreateParams params) throws StripeException public static Product create(ProductCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/products"); - return request(ApiResource.RequestMethod.POST, url, params, Product.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Product.class, options); } /** @@ -208,7 +206,7 @@ public static Product retrieve(String id, Map params, RequestOpt String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/products/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, Product.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Product.class, options); } /** @@ -222,7 +220,7 @@ public static Product retrieve(String id, ProductRetrieveParams params, RequestO String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/products/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, Product.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Product.class, options); } /** @@ -251,7 +249,7 @@ public Product update(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/products/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Product.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Product.class, options); } /** @@ -278,7 +276,7 @@ public Product update(ProductUpdateParams params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/products/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Product.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Product.class, options); } /** @@ -296,7 +294,7 @@ public static ProductCollection list(Map params) throws StripeEx public static ProductCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/products"); - return requestCollection(url, params, ProductCollection.class, options); + return ApiResource.requestCollection(url, params, ProductCollection.class, options); } /** @@ -314,7 +312,7 @@ public static ProductCollection list(ProductListParams params) throws StripeExce public static ProductCollection list(ProductListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/products"); - return requestCollection(url, params, ProductCollection.class, options); + return ApiResource.requestCollection(url, params, ProductCollection.class, options); } /** @@ -355,6 +353,7 @@ public Product delete(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/products/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Product.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Product.class, options); } } diff --git a/src/main/java/com/stripe/model/ProductCollection.java b/src/main/java/com/stripe/model/ProductCollection.java index e78a1f7118e..9f8efce10e0 100644 --- a/src/main/java/com/stripe/model/ProductCollection.java +++ b/src/main/java/com/stripe/model/ProductCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class ProductCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Recipient.java b/src/main/java/com/stripe/model/Recipient.java index de342e934f2..d04d30bd7fa 100644 --- a/src/main/java/com/stripe/model/Recipient.java +++ b/src/main/java/com/stripe/model/Recipient.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -171,7 +169,7 @@ public static RecipientCollection list(Map params) throws Stripe public static RecipientCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/recipients"); - return requestCollection(url, params, RecipientCollection.class, options); + return ApiResource.requestCollection(url, params, RecipientCollection.class, options); } /** @@ -189,7 +187,7 @@ public static RecipientCollection list(RecipientListParams params) throws Stripe public static RecipientCollection list(RecipientListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/recipients"); - return requestCollection(url, params, RecipientCollection.class, options); + return ApiResource.requestCollection(url, params, RecipientCollection.class, options); } /** @@ -207,7 +205,8 @@ public static Recipient create(Map params) throws StripeExceptio public static Recipient create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/recipients"); - return request(ApiResource.RequestMethod.POST, url, params, Recipient.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Recipient.class, options); } /** @@ -225,7 +224,8 @@ public static Recipient create(RecipientCreateParams params) throws StripeExcept public static Recipient create(RecipientCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/recipients"); - return request(ApiResource.RequestMethod.POST, url, params, Recipient.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Recipient.class, options); } /** @@ -254,7 +254,8 @@ public static Recipient retrieve(String id, Map params, RequestO String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/recipients/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, Recipient.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, Recipient.class, options); } /** @@ -267,7 +268,8 @@ public static Recipient retrieve( String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/recipients/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, Recipient.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, Recipient.class, options); } /** @@ -297,7 +299,8 @@ public Recipient update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/recipients/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Recipient.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Recipient.class, options); } /** @@ -325,7 +328,8 @@ public Recipient update(RecipientUpdateParams params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/recipients/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Recipient.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Recipient.class, options); } /** Permanently deletes a recipient. It cannot be undone. */ @@ -351,6 +355,7 @@ public Recipient delete(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/recipients/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Recipient.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Recipient.class, options); } } diff --git a/src/main/java/com/stripe/model/RecipientCollection.java b/src/main/java/com/stripe/model/RecipientCollection.java index f9725579be3..46f4f4336ef 100644 --- a/src/main/java/com/stripe/model/RecipientCollection.java +++ b/src/main/java/com/stripe/model/RecipientCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class RecipientCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index b4d48de3171..0b484e7bee3 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -19,7 +17,7 @@ @Getter @Setter @EqualsAndHashCode(callSuper = false) -public class Refund extends ApiResource implements BalanceTransactionSource, MetadataStore { +public class Refund extends ApiResource implements MetadataStore, BalanceTransactionSource { /** Amount, in %s. */ @SerializedName("amount") Long amount; @@ -238,7 +236,7 @@ public static RefundCollection list(Map params) throws StripeExc public static RefundCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/refunds"); - return requestCollection(url, params, RefundCollection.class, options); + return ApiResource.requestCollection(url, params, RefundCollection.class, options); } /** @@ -258,7 +256,7 @@ public static RefundCollection list(RefundListParams params) throws StripeExcept public static RefundCollection list(RefundListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/refunds"); - return requestCollection(url, params, RefundCollection.class, options); + return ApiResource.requestCollection(url, params, RefundCollection.class, options); } /** Create a refund. */ @@ -270,7 +268,7 @@ public static Refund create(Map params) throws StripeException { public static Refund create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/refunds"); - return request(ApiResource.RequestMethod.POST, url, params, Refund.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Refund.class, options); } /** Create a refund. */ @@ -282,7 +280,7 @@ public static Refund create(RefundCreateParams params) throws StripeException { public static Refund create(RefundCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/refunds"); - return request(ApiResource.RequestMethod.POST, url, params, Refund.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Refund.class, options); } /** Retrieves the details of an existing refund. */ @@ -302,7 +300,7 @@ public static Refund retrieve(String refund, Map params, Request String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/refunds/%s", ApiResource.urlEncodeId(refund))); - return request(ApiResource.RequestMethod.GET, url, params, Refund.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Refund.class, options); } /** Retrieves the details of an existing refund. */ @@ -312,7 +310,7 @@ public static Refund retrieve(String refund, RefundRetrieveParams params, Reques String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/refunds/%s", ApiResource.urlEncodeId(refund))); - return request(ApiResource.RequestMethod.GET, url, params, Refund.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Refund.class, options); } /** @@ -339,7 +337,7 @@ public Refund update(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/refunds/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Refund.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Refund.class, options); } /** @@ -364,6 +362,6 @@ public Refund update(RefundUpdateParams params, RequestOptions options) throws S "%s%s", Stripe.getApiBase(), String.format("/v1/refunds/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Refund.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Refund.class, options); } } diff --git a/src/main/java/com/stripe/model/RefundCollection.java b/src/main/java/com/stripe/model/RefundCollection.java index ca7c93d4566..d3f414841bf 100644 --- a/src/main/java/com/stripe/model/RefundCollection.java +++ b/src/main/java/com/stripe/model/RefundCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.stripe.Stripe; diff --git a/src/main/java/com/stripe/model/ReserveTransaction.java b/src/main/java/com/stripe/model/ReserveTransaction.java index 90d9d2d79ac..378c0b6296a 100644 --- a/src/main/java/com/stripe/model/ReserveTransaction.java +++ b/src/main/java/com/stripe/model/ReserveTransaction.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/Review.java b/src/main/java/com/stripe/model/Review.java index 7cc4bd4f9b3..86dc4587355 100644 --- a/src/main/java/com/stripe/model/Review.java +++ b/src/main/java/com/stripe/model/Review.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -148,7 +146,7 @@ public static ReviewCollection list(Map params) throws StripeExc public static ReviewCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/reviews"); - return requestCollection(url, params, ReviewCollection.class, options); + return ApiResource.requestCollection(url, params, ReviewCollection.class, options); } /** @@ -168,7 +166,7 @@ public static ReviewCollection list(ReviewListParams params) throws StripeExcept public static ReviewCollection list(ReviewListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/reviews"); - return requestCollection(url, params, ReviewCollection.class, options); + return ApiResource.requestCollection(url, params, ReviewCollection.class, options); } /** Retrieves a Review object. */ @@ -188,7 +186,7 @@ public static Review retrieve(String review, Map params, Request String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/reviews/%s", ApiResource.urlEncodeId(review))); - return request(ApiResource.RequestMethod.GET, url, params, Review.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Review.class, options); } /** Retrieves a Review object. */ @@ -198,7 +196,7 @@ public static Review retrieve(String review, ReviewRetrieveParams params, Reques String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/reviews/%s", ApiResource.urlEncodeId(review))); - return request(ApiResource.RequestMethod.GET, url, params, Review.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Review.class, options); } /** Approves a Review object, closing it and removing it from the list of reviews. */ @@ -223,7 +221,7 @@ public Review approve(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/reviews/%s/approve", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Review.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Review.class, options); } /** Approves a Review object, closing it and removing it from the list of reviews. */ @@ -238,7 +236,7 @@ public Review approve(ReviewApproveParams params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/reviews/%s/approve", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Review.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Review.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/ReviewCollection.java b/src/main/java/com/stripe/model/ReviewCollection.java index 6fde63b5e04..ebaf433e46c 100644 --- a/src/main/java/com/stripe/model/ReviewCollection.java +++ b/src/main/java/com/stripe/model/ReviewCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class ReviewCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/SetupIntent.java b/src/main/java/com/stripe/model/SetupIntent.java index 363e590f37a..6dc4c51c9ce 100644 --- a/src/main/java/com/stripe/model/SetupIntent.java +++ b/src/main/java/com/stripe/model/SetupIntent.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -232,7 +230,8 @@ public static SetupIntent create(Map params) throws StripeExcept public static SetupIntent create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/setup_intents"); - return request(ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); } /** @@ -256,7 +255,8 @@ public static SetupIntent create(SetupIntentCreateParams params) throws StripeEx public static SetupIntent create(SetupIntentCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/setup_intents"); - return request(ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); } /** Returns a list of SetupIntents. */ @@ -268,7 +268,7 @@ public static SetupIntentCollection list(Map params) throws Stri public static SetupIntentCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/setup_intents"); - return requestCollection(url, params, SetupIntentCollection.class, options); + return ApiResource.requestCollection(url, params, SetupIntentCollection.class, options); } /** Returns a list of SetupIntents. */ @@ -280,7 +280,7 @@ public static SetupIntentCollection list(SetupIntentListParams params) throws St public static SetupIntentCollection list(SetupIntentListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/setup_intents"); - return requestCollection(url, params, SetupIntentCollection.class, options); + return ApiResource.requestCollection(url, params, SetupIntentCollection.class, options); } /** @@ -325,7 +325,8 @@ public static SetupIntent retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/setup_intents/%s", ApiResource.urlEncodeId(intent))); - return request(ApiResource.RequestMethod.GET, url, params, SetupIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, SetupIntent.class, options); } /** @@ -345,7 +346,8 @@ public static SetupIntent retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/setup_intents/%s", ApiResource.urlEncodeId(intent))); - return request(ApiResource.RequestMethod.GET, url, params, SetupIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, SetupIntent.class, options); } /** Updates a SetupIntent object. */ @@ -363,7 +365,8 @@ public SetupIntent update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/setup_intents/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); } /** Updates a SetupIntent object. */ @@ -379,7 +382,8 @@ public SetupIntent update(SetupIntentUpdateParams params, RequestOptions options "%s%s", Stripe.getApiBase(), String.format("/v1/setup_intents/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); } /** @@ -449,7 +453,8 @@ public SetupIntent confirm(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/setup_intents/%s/confirm", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); } /** @@ -487,7 +492,8 @@ public SetupIntent confirm(SetupIntentConfirmParams params, RequestOptions optio "%s%s", Stripe.getApiBase(), String.format("/v1/setup_intents/%s/confirm", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); } /** @@ -541,7 +547,8 @@ public SetupIntent cancel(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/setup_intents/%s/cancel", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); } /** @@ -571,7 +578,8 @@ public SetupIntent cancel(SetupIntentCancelParams params, RequestOptions options "%s%s", Stripe.getApiBase(), String.format("/v1/setup_intents/%s/cancel", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, SetupIntent.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/SetupIntentCollection.java b/src/main/java/com/stripe/model/SetupIntentCollection.java index d611bf77f1f..9a79a9dfe40 100644 --- a/src/main/java/com/stripe/model/SetupIntentCollection.java +++ b/src/main/java/com/stripe/model/SetupIntentCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class SetupIntentCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/ShippingDetails.java b/src/main/java/com/stripe/model/ShippingDetails.java index 7cdff2a503b..48897b86ad6 100644 --- a/src/main/java/com/stripe/model/ShippingDetails.java +++ b/src/main/java/com/stripe/model/ShippingDetails.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/Sku.java b/src/main/java/com/stripe/model/Sku.java index 7e1eda2665d..d567163e8a7 100644 --- a/src/main/java/com/stripe/model/Sku.java +++ b/src/main/java/com/stripe/model/Sku.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -141,7 +139,7 @@ public static Sku retrieve(String id, Map params, RequestOptions String url = String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/skus/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, Sku.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Sku.class, options); } /** @@ -153,7 +151,7 @@ public static Sku retrieve(String id, SkuRetrieveParams params, RequestOptions o String url = String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/skus/%s", ApiResource.urlEncodeId(id))); - return request(ApiResource.RequestMethod.GET, url, params, Sku.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Sku.class, options); } /** @@ -171,7 +169,7 @@ public static SkuCollection list(Map params) throws StripeExcept public static SkuCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/skus"); - return requestCollection(url, params, SkuCollection.class, options); + return ApiResource.requestCollection(url, params, SkuCollection.class, options); } /** @@ -189,7 +187,7 @@ public static SkuCollection list(SkuListParams params) throws StripeException { public static SkuCollection list(SkuListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/skus"); - return requestCollection(url, params, SkuCollection.class, options); + return ApiResource.requestCollection(url, params, SkuCollection.class, options); } /** @@ -218,7 +216,7 @@ public Sku update(Map params, RequestOptions options) throws Str "%s%s", Stripe.getApiBase(), String.format("/v1/skus/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Sku.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Sku.class, options); } /** @@ -245,7 +243,7 @@ public Sku update(SkuUpdateParams params, RequestOptions options) throws StripeE "%s%s", Stripe.getApiBase(), String.format("/v1/skus/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Sku.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Sku.class, options); } /** Creates a new SKU associated with a product. */ @@ -257,7 +255,7 @@ public static Sku create(Map params) throws StripeException { public static Sku create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/skus"); - return request(ApiResource.RequestMethod.POST, url, params, Sku.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Sku.class, options); } /** Creates a new SKU associated with a product. */ @@ -268,7 +266,7 @@ public static Sku create(SkuCreateParams params) throws StripeException { /** Creates a new SKU associated with a product. */ public static Sku create(SkuCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/skus"); - return request(ApiResource.RequestMethod.POST, url, params, Sku.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Sku.class, options); } /** Delete a SKU. Deleting a SKU is only possible until it has been used in an order. */ @@ -293,7 +291,7 @@ public Sku delete(Map params, RequestOptions options) throws Str "%s%s", Stripe.getApiBase(), String.format("/v1/skus/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Sku.class, options); + return ApiResource.request(ApiResource.RequestMethod.DELETE, url, params, Sku.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/SkuCollection.java b/src/main/java/com/stripe/model/SkuCollection.java index 31fab21f749..96bde4c7f02 100644 --- a/src/main/java/com/stripe/model/SkuCollection.java +++ b/src/main/java/com/stripe/model/SkuCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class SkuCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Source.java b/src/main/java/com/stripe/model/Source.java index 38b6b7aa743..39ab210d9b6 100644 --- a/src/main/java/com/stripe/model/Source.java +++ b/src/main/java/com/stripe/model/Source.java @@ -1,10 +1,7 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; import com.stripe.Stripe; -import com.stripe.exception.InvalidRequestException; import com.stripe.exception.StripeException; import com.stripe.net.ApiResource; import com.stripe.net.RequestOptions; @@ -22,7 +19,7 @@ @Getter @Setter @EqualsAndHashCode(callSuper = false) -public class Source extends ApiResource implements PaymentSource, MetadataStore { +public class Source extends ApiResource implements MetadataStore, PaymentSource { @SerializedName("ach_credit_transfer") AchCreditTransfer achCreditTransfer; @@ -206,26 +203,16 @@ public Source detach(Map params) throws StripeException { /** Delete a specified source for a given customer. */ public Source detach(Map params, RequestOptions options) throws StripeException { - String url; - if (this.getCustomer() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/customers/%s/sources/%s", - ApiResource.urlEncodeId(this.getCustomer()), - ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [customer] field(s) are all null", - null, - null, - null, - 0, - null); - } - return request(ApiResource.RequestMethod.DELETE, url, params, Source.class, options); + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/customers/%s/sources/%s", + ApiResource.urlEncodeId(this.getCustomer()), + ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Source.class, options); } /** @@ -254,7 +241,7 @@ public static Source retrieve(String source, Map params, Request String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/sources/%s", ApiResource.urlEncodeId(source))); - return request(ApiResource.RequestMethod.GET, url, params, Source.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Source.class, options); } /** @@ -267,7 +254,7 @@ public static Source retrieve(String source, SourceRetrieveParams params, Reques String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/sources/%s", ApiResource.urlEncodeId(source))); - return request(ApiResource.RequestMethod.GET, url, params, Source.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Source.class, options); } /** Creates a new source object. */ @@ -279,7 +266,7 @@ public static Source create(Map params) throws StripeException { public static Source create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/sources"); - return request(ApiResource.RequestMethod.POST, url, params, Source.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Source.class, options); } /** Creates a new source object. */ @@ -291,7 +278,7 @@ public static Source create(SourceCreateParams params) throws StripeException { public static Source create(SourceCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/sources"); - return request(ApiResource.RequestMethod.POST, url, params, Source.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Source.class, options); } /** @@ -322,7 +309,7 @@ public Source update(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/sources/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Source.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Source.class, options); } /** @@ -351,7 +338,7 @@ public Source update(SourceUpdateParams params, RequestOptions options) throws S "%s%s", Stripe.getApiBase(), String.format("/v1/sources/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Source.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Source.class, options); } /** Verify a given source. */ @@ -366,7 +353,7 @@ public Source verify(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/sources/%s/verify", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Source.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Source.class, options); } /** Verify a given source. */ @@ -381,7 +368,7 @@ public Source verify(SourceVerifyParams params, RequestOptions options) throws S "%s%s", Stripe.getApiBase(), String.format("/v1/sources/%s/verify", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Source.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Source.class, options); } /** List source transactions for a given source. */ @@ -404,7 +391,7 @@ public SourceTransactionCollection sourceTransactions( Stripe.getApiBase(), String.format( "/v1/sources/%s/source_transactions", ApiResource.urlEncodeId(this.getId()))); - return requestCollection(url, params, SourceTransactionCollection.class, options); + return ApiResource.requestCollection(url, params, SourceTransactionCollection.class, options); } /** List source transactions for a given source. */ @@ -422,7 +409,7 @@ public SourceTransactionCollection sourceTransactions( Stripe.getApiBase(), String.format( "/v1/sources/%s/source_transactions", ApiResource.urlEncodeId(this.getId()))); - return requestCollection(url, params, SourceTransactionCollection.class, options); + return ApiResource.requestCollection(url, params, SourceTransactionCollection.class, options); } @Getter @@ -888,7 +875,7 @@ public static class Order extends StripeObject { /** List of items constituting the order. */ @SerializedName("items") - List items; + List items; @SerializedName("shipping") ShippingDetails shipping; diff --git a/src/main/java/com/stripe/model/SourceMandateNotification.java b/src/main/java/com/stripe/model/SourceMandateNotification.java index 4c1ba6c3d66..e9b3c92467b 100644 --- a/src/main/java/com/stripe/model/SourceMandateNotification.java +++ b/src/main/java/com/stripe/model/SourceMandateNotification.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/SourceTransaction.java b/src/main/java/com/stripe/model/SourceTransaction.java index 5652e51a864..87e66b29128 100644 --- a/src/main/java/com/stripe/model/SourceTransaction.java +++ b/src/main/java/com/stripe/model/SourceTransaction.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/SourceTransactionCollection.java b/src/main/java/com/stripe/model/SourceTransactionCollection.java index 3d134efcbe6..0e0a971221f 100644 --- a/src/main/java/com/stripe/model/SourceTransactionCollection.java +++ b/src/main/java/com/stripe/model/SourceTransactionCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class SourceTransactionCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index 9150ddd949d..04f1353f419 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/StripeErrorResponse.java b/src/main/java/com/stripe/model/StripeErrorResponse.java index ed7030c4ad1..4b6e4ac17a2 100644 --- a/src/main/java/com/stripe/model/StripeErrorResponse.java +++ b/src/main/java/com/stripe/model/StripeErrorResponse.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index 677a5c83240..0a40d3b7a82 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -406,7 +404,7 @@ public static SubscriptionCollection list(Map params) throws Str public static SubscriptionCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/subscriptions"); - return requestCollection(url, params, SubscriptionCollection.class, options); + return ApiResource.requestCollection(url, params, SubscriptionCollection.class, options); } /** @@ -424,7 +422,7 @@ public static SubscriptionCollection list(SubscriptionListParams params) throws public static SubscriptionCollection list(SubscriptionListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/subscriptions"); - return requestCollection(url, params, SubscriptionCollection.class, options); + return ApiResource.requestCollection(url, params, SubscriptionCollection.class, options); } /** Creates a new subscription on an existing customer. */ @@ -436,7 +434,8 @@ public static Subscription create(Map params) throws StripeExcep public static Subscription create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/subscriptions"); - return request(ApiResource.RequestMethod.POST, url, params, Subscription.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Subscription.class, options); } /** Creates a new subscription on an existing customer. */ @@ -448,7 +447,8 @@ public static Subscription create(SubscriptionCreateParams params) throws Stripe public static Subscription create(SubscriptionCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/subscriptions"); - return request(ApiResource.RequestMethod.POST, url, params, Subscription.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Subscription.class, options); } /** @@ -476,7 +476,8 @@ public Subscription update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/subscriptions/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Subscription.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Subscription.class, options); } /** @@ -502,7 +503,8 @@ public Subscription update(SubscriptionUpdateParams params, RequestOptions optio "%s%s", Stripe.getApiBase(), String.format("/v1/subscriptions/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Subscription.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Subscription.class, options); } /** Retrieves the subscription with the given ID. */ @@ -525,7 +527,8 @@ public static Subscription retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/subscriptions/%s", ApiResource.urlEncodeId(subscriptionExposedId))); - return request(ApiResource.RequestMethod.GET, url, params, Subscription.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, Subscription.class, options); } /** Retrieves the subscription with the given ID. */ @@ -537,7 +540,8 @@ public static Subscription retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/subscriptions/%s", ApiResource.urlEncodeId(subscriptionExposedId))); - return request(ApiResource.RequestMethod.GET, url, params, Subscription.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, Subscription.class, options); } /** @@ -603,7 +607,8 @@ public Subscription cancel(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/subscriptions/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Subscription.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Subscription.class, options); } /** @@ -649,7 +654,8 @@ public Subscription cancel(SubscriptionCancelParams params, RequestOptions optio "%s%s", Stripe.getApiBase(), String.format("/v1/subscriptions/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Subscription.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Subscription.class, options); } /** Removes the currently applied discount on a subscription. */ @@ -670,7 +676,8 @@ public Discount deleteDiscount(Map params, RequestOptions option "%s%s", Stripe.getApiBase(), String.format("/v1/subscriptions/%s/discount", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Discount.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Discount.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/SubscriptionCollection.java b/src/main/java/com/stripe/model/SubscriptionCollection.java index e31219db387..2b5d834621a 100644 --- a/src/main/java/com/stripe/model/SubscriptionCollection.java +++ b/src/main/java/com/stripe/model/SubscriptionCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class SubscriptionCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/SubscriptionItem.java b/src/main/java/com/stripe/model/SubscriptionItem.java index 17a80ab26ac..fee301bd249 100644 --- a/src/main/java/com/stripe/model/SubscriptionItem.java +++ b/src/main/java/com/stripe/model/SubscriptionItem.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -86,7 +84,7 @@ public static SubscriptionItemCollection list(Map params) throws public static SubscriptionItemCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/subscription_items"); - return requestCollection(url, params, SubscriptionItemCollection.class, options); + return ApiResource.requestCollection(url, params, SubscriptionItemCollection.class, options); } /** Returns a list of your subscription items for a given subscription. */ @@ -99,7 +97,7 @@ public static SubscriptionItemCollection list(SubscriptionItemListParams params) public static SubscriptionItemCollection list( SubscriptionItemListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/subscription_items"); - return requestCollection(url, params, SubscriptionItemCollection.class, options); + return ApiResource.requestCollection(url, params, SubscriptionItemCollection.class, options); } /** Retrieves the invoice item with the given ID. */ @@ -121,7 +119,8 @@ public static SubscriptionItem retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/subscription_items/%s", ApiResource.urlEncodeId(item))); - return request(ApiResource.RequestMethod.GET, url, params, SubscriptionItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, SubscriptionItem.class, options); } /** Retrieves the invoice item with the given ID. */ @@ -133,7 +132,8 @@ public static SubscriptionItem retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/subscription_items/%s", ApiResource.urlEncodeId(item))); - return request(ApiResource.RequestMethod.GET, url, params, SubscriptionItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, SubscriptionItem.class, options); } /** Adds a new item to an existing subscription. No existing items will be changed or replaced. */ @@ -145,7 +145,8 @@ public static SubscriptionItem create(Map params) throws StripeE public static SubscriptionItem create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/subscription_items"); - return request(ApiResource.RequestMethod.POST, url, params, SubscriptionItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, SubscriptionItem.class, options); } /** Adds a new item to an existing subscription. No existing items will be changed or replaced. */ @@ -158,7 +159,8 @@ public static SubscriptionItem create(SubscriptionItemCreateParams params) public static SubscriptionItem create(SubscriptionItemCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/subscription_items"); - return request(ApiResource.RequestMethod.POST, url, params, SubscriptionItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, SubscriptionItem.class, options); } /** Updates the plan or quantity of an item on a current subscription. */ @@ -176,7 +178,8 @@ public SubscriptionItem update(Map params, RequestOptions option "%s%s", Stripe.getApiBase(), String.format("/v1/subscription_items/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, SubscriptionItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, SubscriptionItem.class, options); } /** Updates the plan or quantity of an item on a current subscription. */ @@ -192,7 +195,8 @@ public SubscriptionItem update(SubscriptionItemUpdateParams params, RequestOptio "%s%s", Stripe.getApiBase(), String.format("/v1/subscription_items/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, SubscriptionItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, SubscriptionItem.class, options); } /** @@ -230,7 +234,8 @@ public SubscriptionItem delete(Map params, RequestOptions option "%s%s", Stripe.getApiBase(), String.format("/v1/subscription_items/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, SubscriptionItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, SubscriptionItem.class, options); } /** @@ -252,7 +257,8 @@ public SubscriptionItem delete(SubscriptionItemDeleteParams params, RequestOptio "%s%s", Stripe.getApiBase(), String.format("/v1/subscription_items/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, SubscriptionItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, SubscriptionItem.class, options); } /** @@ -303,7 +309,7 @@ public UsageRecordSummaryCollection usageRecordSummaries( String.format( "/v1/subscription_items/%s/usage_record_summaries", ApiResource.urlEncodeId(this.getId()))); - return requestCollection(url, params, UsageRecordSummaryCollection.class, options); + return ApiResource.requestCollection(url, params, UsageRecordSummaryCollection.class, options); } /** @@ -341,7 +347,7 @@ public UsageRecordSummaryCollection usageRecordSummaries( String.format( "/v1/subscription_items/%s/usage_record_summaries", ApiResource.urlEncodeId(this.getId()))); - return requestCollection(url, params, UsageRecordSummaryCollection.class, options); + return ApiResource.requestCollection(url, params, UsageRecordSummaryCollection.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/SubscriptionItemCollection.java b/src/main/java/com/stripe/model/SubscriptionItemCollection.java index 8f52417a101..95645429502 100644 --- a/src/main/java/com/stripe/model/SubscriptionItemCollection.java +++ b/src/main/java/com/stripe/model/SubscriptionItemCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class SubscriptionItemCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/SubscriptionSchedule.java b/src/main/java/com/stripe/model/SubscriptionSchedule.java index 1d3fee2f9c7..693acda2bd0 100644 --- a/src/main/java/com/stripe/model/SubscriptionSchedule.java +++ b/src/main/java/com/stripe/model/SubscriptionSchedule.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -131,7 +129,7 @@ public class SubscriptionSchedule extends ApiResource /** Configuration for the subscription schedule's phases. */ @SerializedName("phases") - List phases; + List phases; /** * Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. @@ -249,7 +247,8 @@ public static SubscriptionScheduleCollection list(Map params) public static SubscriptionScheduleCollection list( Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/subscription_schedules"); - return requestCollection(url, params, SubscriptionScheduleCollection.class, options); + return ApiResource.requestCollection( + url, params, SubscriptionScheduleCollection.class, options); } /** Retrieves the list of your subscription schedules. */ @@ -262,7 +261,8 @@ public static SubscriptionScheduleCollection list(SubscriptionScheduleListParams public static SubscriptionScheduleCollection list( SubscriptionScheduleListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/subscription_schedules"); - return requestCollection(url, params, SubscriptionScheduleCollection.class, options); + return ApiResource.requestCollection( + url, params, SubscriptionScheduleCollection.class, options); } /** Creates a new subscription schedule object. */ @@ -274,7 +274,7 @@ public static SubscriptionSchedule create(Map params) throws Str public static SubscriptionSchedule create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/subscription_schedules"); - return request( + return ApiResource.request( ApiResource.RequestMethod.POST, url, params, SubscriptionSchedule.class, options); } @@ -288,7 +288,7 @@ public static SubscriptionSchedule create(SubscriptionScheduleCreateParams param public static SubscriptionSchedule create( SubscriptionScheduleCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/subscription_schedules"); - return request( + return ApiResource.request( ApiResource.RequestMethod.POST, url, params, SubscriptionSchedule.class, options); } @@ -320,7 +320,8 @@ public static SubscriptionSchedule retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/subscription_schedules/%s", ApiResource.urlEncodeId(schedule))); - return request(ApiResource.RequestMethod.GET, url, params, SubscriptionSchedule.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, SubscriptionSchedule.class, options); } /** @@ -335,7 +336,8 @@ public static SubscriptionSchedule retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/subscription_schedules/%s", ApiResource.urlEncodeId(schedule))); - return request(ApiResource.RequestMethod.GET, url, params, SubscriptionSchedule.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, SubscriptionSchedule.class, options); } /** Updates an existing subscription schedule. */ @@ -353,7 +355,7 @@ public SubscriptionSchedule update(Map params, RequestOptions op "%s%s", Stripe.getApiBase(), String.format("/v1/subscription_schedules/%s", ApiResource.urlEncodeId(this.getId()))); - return request( + return ApiResource.request( ApiResource.RequestMethod.POST, url, params, SubscriptionSchedule.class, options); } @@ -371,7 +373,7 @@ public SubscriptionSchedule update( "%s%s", Stripe.getApiBase(), String.format("/v1/subscription_schedules/%s", ApiResource.urlEncodeId(this.getId()))); - return request( + return ApiResource.request( ApiResource.RequestMethod.POST, url, params, SubscriptionSchedule.class, options); } @@ -415,7 +417,7 @@ public SubscriptionSchedule cancel(Map params, RequestOptions op Stripe.getApiBase(), String.format( "/v1/subscription_schedules/%s/cancel", ApiResource.urlEncodeId(this.getId()))); - return request( + return ApiResource.request( ApiResource.RequestMethod.POST, url, params, SubscriptionSchedule.class, options); } @@ -442,7 +444,7 @@ public SubscriptionSchedule cancel( Stripe.getApiBase(), String.format( "/v1/subscription_schedules/%s/cancel", ApiResource.urlEncodeId(this.getId()))); - return request( + return ApiResource.request( ApiResource.RequestMethod.POST, url, params, SubscriptionSchedule.class, options); } @@ -494,7 +496,7 @@ public SubscriptionSchedule release(Map params, RequestOptions o Stripe.getApiBase(), String.format( "/v1/subscription_schedules/%s/release", ApiResource.urlEncodeId(this.getId()))); - return request( + return ApiResource.request( ApiResource.RequestMethod.POST, url, params, SubscriptionSchedule.class, options); } @@ -525,7 +527,7 @@ public SubscriptionSchedule release( Stripe.getApiBase(), String.format( "/v1/subscription_schedules/%s/release", ApiResource.urlEncodeId(this.getId()))); - return request( + return ApiResource.request( ApiResource.RequestMethod.POST, url, params, SubscriptionSchedule.class, options); } @@ -610,7 +612,7 @@ public static class Phase extends StripeObject { /** Plans to subscribe during this phase of the subscription schedule. */ @SerializedName("plans") - List plans; + List plans; /** The start of this phase of the subscription schedule. */ @SerializedName("start_date") diff --git a/src/main/java/com/stripe/model/SubscriptionScheduleCollection.java b/src/main/java/com/stripe/model/SubscriptionScheduleCollection.java index b8da1dad16e..50ce50d7b0b 100644 --- a/src/main/java/com/stripe/model/SubscriptionScheduleCollection.java +++ b/src/main/java/com/stripe/model/SubscriptionScheduleCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class SubscriptionScheduleCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/TaxId.java b/src/main/java/com/stripe/model/TaxId.java index ed95f7e000c..31409571af3 100644 --- a/src/main/java/com/stripe/model/TaxId.java +++ b/src/main/java/com/stripe/model/TaxId.java @@ -1,10 +1,7 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; import com.stripe.Stripe; -import com.stripe.exception.InvalidRequestException; import com.stripe.exception.StripeException; import com.stripe.net.ApiResource; import com.stripe.net.RequestOptions; @@ -97,26 +94,15 @@ public TaxId delete(Map params) throws StripeException { /** Deletes an existing TaxID object. */ public TaxId delete(Map params, RequestOptions options) throws StripeException { - String url; - if (this.getCustomer() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/customers/%s/tax_ids/%s", - ApiResource.urlEncodeId(this.getCustomer()), - ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [customer] field(s) are all null", - null, - null, - null, - 0, - null); - } - return request(ApiResource.RequestMethod.DELETE, url, params, TaxId.class, options); + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/customers/%s/tax_ids/%s", + ApiResource.urlEncodeId(this.getCustomer()), + ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request(ApiResource.RequestMethod.DELETE, url, params, TaxId.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/TaxIdCollection.java b/src/main/java/com/stripe/model/TaxIdCollection.java index 2f641396927..0f7117d9e0f 100644 --- a/src/main/java/com/stripe/model/TaxIdCollection.java +++ b/src/main/java/com/stripe/model/TaxIdCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.stripe.Stripe; diff --git a/src/main/java/com/stripe/model/TaxRate.java b/src/main/java/com/stripe/model/TaxRate.java index 7771d4a02b3..3f11dcb9fc9 100644 --- a/src/main/java/com/stripe/model/TaxRate.java +++ b/src/main/java/com/stripe/model/TaxRate.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -97,7 +95,7 @@ public static TaxRateCollection list(Map params) throws StripeEx public static TaxRateCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/tax_rates"); - return requestCollection(url, params, TaxRateCollection.class, options); + return ApiResource.requestCollection(url, params, TaxRateCollection.class, options); } /** @@ -115,7 +113,7 @@ public static TaxRateCollection list(TaxRateListParams params) throws StripeExce public static TaxRateCollection list(TaxRateListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/tax_rates"); - return requestCollection(url, params, TaxRateCollection.class, options); + return ApiResource.requestCollection(url, params, TaxRateCollection.class, options); } /** Retrieves a tax rate with the given ID. */ @@ -136,7 +134,7 @@ public static TaxRate retrieve(String taxRate, Map params, Reque "%s%s", Stripe.getApiBase(), String.format("/v1/tax_rates/%s", ApiResource.urlEncodeId(taxRate))); - return request(ApiResource.RequestMethod.GET, url, params, TaxRate.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, TaxRate.class, options); } /** Retrieves a tax rate with the given ID. */ @@ -147,7 +145,7 @@ public static TaxRate retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/tax_rates/%s", ApiResource.urlEncodeId(taxRate))); - return request(ApiResource.RequestMethod.GET, url, params, TaxRate.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, TaxRate.class, options); } /** Creates a new tax rate. */ @@ -159,7 +157,7 @@ public static TaxRate create(Map params) throws StripeException public static TaxRate create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/tax_rates"); - return request(ApiResource.RequestMethod.POST, url, params, TaxRate.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, TaxRate.class, options); } /** Creates a new tax rate. */ @@ -171,7 +169,7 @@ public static TaxRate create(TaxRateCreateParams params) throws StripeException public static TaxRate create(TaxRateCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/tax_rates"); - return request(ApiResource.RequestMethod.POST, url, params, TaxRate.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, TaxRate.class, options); } /** Updates an existing tax rate. */ @@ -188,7 +186,7 @@ public TaxRate update(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/tax_rates/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, TaxRate.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, TaxRate.class, options); } /** Updates an existing tax rate. */ @@ -203,6 +201,6 @@ public TaxRate update(TaxRateUpdateParams params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/tax_rates/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, TaxRate.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, TaxRate.class, options); } } diff --git a/src/main/java/com/stripe/model/TaxRateCollection.java b/src/main/java/com/stripe/model/TaxRateCollection.java index 498efee448f..f4c086710e3 100644 --- a/src/main/java/com/stripe/model/TaxRateCollection.java +++ b/src/main/java/com/stripe/model/TaxRateCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class TaxRateCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/ThreeDSecure.java b/src/main/java/com/stripe/model/ThreeDSecure.java index cebf280147b..9a9afd81008 100644 --- a/src/main/java/com/stripe/model/ThreeDSecure.java +++ b/src/main/java/com/stripe/model/ThreeDSecure.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -96,7 +94,8 @@ public static ThreeDSecure retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/3d_secure/%s", ApiResource.urlEncodeId(threeDSecure))); - return request(ApiResource.RequestMethod.GET, url, params, ThreeDSecure.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ThreeDSecure.class, options); } /** Retrieves a 3D Secure object. */ @@ -108,7 +107,8 @@ public static ThreeDSecure retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/3d_secure/%s", ApiResource.urlEncodeId(threeDSecure))); - return request(ApiResource.RequestMethod.GET, url, params, ThreeDSecure.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ThreeDSecure.class, options); } /** Initiate 3D Secure authentication. */ @@ -120,7 +120,8 @@ public static ThreeDSecure create(Map params) throws StripeExcep public static ThreeDSecure create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/3d_secure"); - return request(ApiResource.RequestMethod.POST, url, params, ThreeDSecure.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ThreeDSecure.class, options); } /** Initiate 3D Secure authentication. */ @@ -132,6 +133,7 @@ public static ThreeDSecure create(ThreeDSecureCreateParams params) throws Stripe public static ThreeDSecure create(ThreeDSecureCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/3d_secure"); - return request(ApiResource.RequestMethod.POST, url, params, ThreeDSecure.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ThreeDSecure.class, options); } } diff --git a/src/main/java/com/stripe/model/Token.java b/src/main/java/com/stripe/model/Token.java index b3d7bce1eb8..8a73b691c24 100644 --- a/src/main/java/com/stripe/model/Token.java +++ b/src/main/java/com/stripe/model/Token.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -80,7 +78,7 @@ public static Token retrieve(String token, Map params, RequestOp String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/tokens/%s", ApiResource.urlEncodeId(token))); - return request(ApiResource.RequestMethod.GET, url, params, Token.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Token.class, options); } /** Retrieves the token with the given ID. */ @@ -90,7 +88,7 @@ public static Token retrieve(String token, TokenRetrieveParams params, RequestOp String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/tokens/%s", ApiResource.urlEncodeId(token))); - return request(ApiResource.RequestMethod.GET, url, params, Token.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Token.class, options); } /** @@ -110,7 +108,7 @@ public static Token create(Map params) throws StripeException { public static Token create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/tokens"); - return request(ApiResource.RequestMethod.POST, url, params, Token.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Token.class, options); } /** @@ -130,6 +128,6 @@ public static Token create(TokenCreateParams params) throws StripeException { public static Token create(TokenCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/tokens"); - return request(ApiResource.RequestMethod.POST, url, params, Token.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Token.class, options); } } diff --git a/src/main/java/com/stripe/model/Topup.java b/src/main/java/com/stripe/model/Topup.java index ef6bcca2bcf..66a3349557a 100644 --- a/src/main/java/com/stripe/model/Topup.java +++ b/src/main/java/com/stripe/model/Topup.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -20,7 +18,7 @@ @Getter @Setter @EqualsAndHashCode(callSuper = false) -public class Topup extends ApiResource implements BalanceTransactionSource, MetadataStore { +public class Topup extends ApiResource implements MetadataStore, BalanceTransactionSource { /** Amount transferred. */ @SerializedName("amount") Long amount; @@ -139,7 +137,7 @@ public static Topup create(Map params) throws StripeException { public static Topup create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/topups"); - return request(ApiResource.RequestMethod.POST, url, params, Topup.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Topup.class, options); } /** Top up the balance of an account. */ @@ -151,7 +149,7 @@ public static Topup create(TopupCreateParams params) throws StripeException { public static Topup create(TopupCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/topups"); - return request(ApiResource.RequestMethod.POST, url, params, Topup.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Topup.class, options); } /** Returns a list of top-ups. */ @@ -163,7 +161,7 @@ public static TopupCollection list(Map params) throws StripeExce public static TopupCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/topups"); - return requestCollection(url, params, TopupCollection.class, options); + return ApiResource.requestCollection(url, params, TopupCollection.class, options); } /** Returns a list of top-ups. */ @@ -175,7 +173,7 @@ public static TopupCollection list(TopupListParams params) throws StripeExceptio public static TopupCollection list(TopupListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/topups"); - return requestCollection(url, params, TopupCollection.class, options); + return ApiResource.requestCollection(url, params, TopupCollection.class, options); } /** @@ -207,7 +205,7 @@ public static Topup retrieve(String topup, Map params, RequestOp String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/topups/%s", ApiResource.urlEncodeId(topup))); - return request(ApiResource.RequestMethod.GET, url, params, Topup.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Topup.class, options); } /** @@ -221,7 +219,7 @@ public static Topup retrieve(String topup, TopupRetrieveParams params, RequestOp String.format( "%s%s", Stripe.getApiBase(), String.format("/v1/topups/%s", ApiResource.urlEncodeId(topup))); - return request(ApiResource.RequestMethod.GET, url, params, Topup.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Topup.class, options); } /** Updates the metadata of a top-up. Other top-up details are not editable by design. */ @@ -238,7 +236,7 @@ public Topup update(Map params, RequestOptions options) throws S "%s%s", Stripe.getApiBase(), String.format("/v1/topups/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Topup.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Topup.class, options); } /** Updates the metadata of a top-up. Other top-up details are not editable by design. */ @@ -253,7 +251,7 @@ public Topup update(TopupUpdateParams params, RequestOptions options) throws Str "%s%s", Stripe.getApiBase(), String.format("/v1/topups/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Topup.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Topup.class, options); } /** Cancels a top-up. Only pending top-ups can be canceled. */ @@ -278,7 +276,7 @@ public Topup cancel(Map params, RequestOptions options) throws S "%s%s", Stripe.getApiBase(), String.format("/v1/topups/%s/cancel", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Topup.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Topup.class, options); } /** Cancels a top-up. Only pending top-ups can be canceled. */ @@ -293,6 +291,6 @@ public Topup cancel(TopupCancelParams params, RequestOptions options) throws Str "%s%s", Stripe.getApiBase(), String.format("/v1/topups/%s/cancel", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Topup.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Topup.class, options); } } diff --git a/src/main/java/com/stripe/model/TopupCollection.java b/src/main/java/com/stripe/model/TopupCollection.java index 7bfee96673d..4b3b263eb76 100644 --- a/src/main/java/com/stripe/model/TopupCollection.java +++ b/src/main/java/com/stripe/model/TopupCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class TopupCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Transfer.java b/src/main/java/com/stripe/model/Transfer.java index 06d778efb57..105b9204063 100644 --- a/src/main/java/com/stripe/model/Transfer.java +++ b/src/main/java/com/stripe/model/Transfer.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -20,7 +18,7 @@ @Setter @EqualsAndHashCode(callSuper = false) public class Transfer extends ApiResource - implements BalanceTransactionSource, MetadataStore { + implements MetadataStore, BalanceTransactionSource { /** Amount in %s to be transferred. */ @SerializedName("amount") Long amount; @@ -216,7 +214,8 @@ public static Transfer create(Map params) throws StripeException public static Transfer create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/transfers"); - return request(ApiResource.RequestMethod.POST, url, params, Transfer.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Transfer.class, options); } /** @@ -236,7 +235,8 @@ public static Transfer create(TransferCreateParams params) throws StripeExceptio public static Transfer create(TransferCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/transfers"); - return request(ApiResource.RequestMethod.POST, url, params, Transfer.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Transfer.class, options); } /** @@ -254,7 +254,7 @@ public static TransferCollection list(Map params) throws StripeE public static TransferCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/transfers"); - return requestCollection(url, params, TransferCollection.class, options); + return ApiResource.requestCollection(url, params, TransferCollection.class, options); } /** @@ -272,7 +272,7 @@ public static TransferCollection list(TransferListParams params) throws StripeEx public static TransferCollection list(TransferListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/transfers"); - return requestCollection(url, params, TransferCollection.class, options); + return ApiResource.requestCollection(url, params, TransferCollection.class, options); } /** @@ -305,7 +305,7 @@ public static Transfer retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/transfers/%s", ApiResource.urlEncodeId(transfer))); - return request(ApiResource.RequestMethod.GET, url, params, Transfer.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Transfer.class, options); } /** @@ -321,7 +321,7 @@ public static Transfer retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/transfers/%s", ApiResource.urlEncodeId(transfer))); - return request(ApiResource.RequestMethod.GET, url, params, Transfer.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Transfer.class, options); } /** @@ -349,7 +349,8 @@ public Transfer update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/transfers/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Transfer.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Transfer.class, options); } /** @@ -375,6 +376,7 @@ public Transfer update(TransferUpdateParams params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/transfers/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Transfer.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Transfer.class, options); } } diff --git a/src/main/java/com/stripe/model/TransferCollection.java b/src/main/java/com/stripe/model/TransferCollection.java index 3786e64f3a6..146b4a2213d 100644 --- a/src/main/java/com/stripe/model/TransferCollection.java +++ b/src/main/java/com/stripe/model/TransferCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class TransferCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/TransferReversal.java b/src/main/java/com/stripe/model/TransferReversal.java index 43fe5d7b371..ca97db93656 100644 --- a/src/main/java/com/stripe/model/TransferReversal.java +++ b/src/main/java/com/stripe/model/TransferReversal.java @@ -1,10 +1,7 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; import com.stripe.Stripe; -import com.stripe.exception.InvalidRequestException; import com.stripe.exception.StripeException; import com.stripe.net.ApiResource; import com.stripe.net.RequestOptions; @@ -18,7 +15,7 @@ @Setter @EqualsAndHashCode(callSuper = false) public class TransferReversal extends ApiResource - implements BalanceTransactionSource, MetadataStore { + implements MetadataStore, BalanceTransactionSource { /** Amount, in %s. */ @SerializedName("amount") Long amount; @@ -172,26 +169,16 @@ public TransferReversal update(Map params) throws StripeExceptio @Override public TransferReversal update(Map params, RequestOptions options) throws StripeException { - String url; - if (this.getTransfer() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/transfers/%s/reversals/%s", - ApiResource.urlEncodeId(this.getTransfer()), - ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [transfer] field(s) are all null", - null, - null, - null, - 0, - null); - } - return request(ApiResource.RequestMethod.POST, url, params, TransferReversal.class, options); + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/transfers/%s/reversals/%s", + ApiResource.urlEncodeId(this.getTransfer()), + ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, TransferReversal.class, options); } /** @@ -212,25 +199,15 @@ public TransferReversal update(TransferReversalUpdateParams params) throws Strip */ public TransferReversal update(TransferReversalUpdateParams params, RequestOptions options) throws StripeException { - String url; - if (this.getTransfer() != null) { - url = - String.format( - "%s%s", - Stripe.getApiBase(), - String.format( - "/v1/transfers/%s/reversals/%s", - ApiResource.urlEncodeId(this.getTransfer()), - ApiResource.urlEncodeId(this.getId()))); - } else { - throw new InvalidRequestException( - "Unable to construct url because [transfer] field(s) are all null", - null, - null, - null, - 0, - null); - } - return request(ApiResource.RequestMethod.POST, url, params, TransferReversal.class, options); + String url = + String.format( + "%s%s", + Stripe.getApiBase(), + String.format( + "/v1/transfers/%s/reversals/%s", + ApiResource.urlEncodeId(this.getTransfer()), + ApiResource.urlEncodeId(this.getId()))); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, TransferReversal.class, options); } } diff --git a/src/main/java/com/stripe/model/TransferReversalCollection.java b/src/main/java/com/stripe/model/TransferReversalCollection.java index 397e54b5674..b9b6181d87c 100644 --- a/src/main/java/com/stripe/model/TransferReversalCollection.java +++ b/src/main/java/com/stripe/model/TransferReversalCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.stripe.Stripe; diff --git a/src/main/java/com/stripe/model/UsageRecord.java b/src/main/java/com/stripe/model/UsageRecord.java index 07f2324da2b..4b7ceb53e94 100644 --- a/src/main/java/com/stripe/model/UsageRecord.java +++ b/src/main/java/com/stripe/model/UsageRecord.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -77,7 +75,8 @@ public static UsageRecord createOnSubscriptionItem( String.format( "/v1/subscription_items/%s/usage_records", ApiResource.urlEncodeId(subscriptionItem))); - return request(ApiResource.RequestMethod.POST, url, params, UsageRecord.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, UsageRecord.class, options); } /** @@ -114,6 +113,7 @@ public static UsageRecord createOnSubscriptionItem( String.format( "/v1/subscription_items/%s/usage_records", ApiResource.urlEncodeId(subscriptionItem))); - return request(ApiResource.RequestMethod.POST, url, params, UsageRecord.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, UsageRecord.class, options); } } diff --git a/src/main/java/com/stripe/model/UsageRecordSummary.java b/src/main/java/com/stripe/model/UsageRecordSummary.java index e3341a59317..d25e328e4f1 100644 --- a/src/main/java/com/stripe/model/UsageRecordSummary.java +++ b/src/main/java/com/stripe/model/UsageRecordSummary.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/UsageRecordSummaryCollection.java b/src/main/java/com/stripe/model/UsageRecordSummaryCollection.java index 19a8f8a4d0d..2f6a8ab6af5 100644 --- a/src/main/java/com/stripe/model/UsageRecordSummaryCollection.java +++ b/src/main/java/com/stripe/model/UsageRecordSummaryCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class UsageRecordSummaryCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/WebhookEndpoint.java b/src/main/java/com/stripe/model/WebhookEndpoint.java index d1cb2ffae17..ddb0310c36e 100644 --- a/src/main/java/com/stripe/model/WebhookEndpoint.java +++ b/src/main/java/com/stripe/model/WebhookEndpoint.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; import com.google.gson.annotations.SerializedName; @@ -83,7 +81,7 @@ public static WebhookEndpointCollection list(Map params) throws public static WebhookEndpointCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/webhook_endpoints"); - return requestCollection(url, params, WebhookEndpointCollection.class, options); + return ApiResource.requestCollection(url, params, WebhookEndpointCollection.class, options); } /** Returns a list of your webhook endpoints. */ @@ -96,7 +94,7 @@ public static WebhookEndpointCollection list(WebhookEndpointListParams params) public static WebhookEndpointCollection list( WebhookEndpointListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/webhook_endpoints"); - return requestCollection(url, params, WebhookEndpointCollection.class, options); + return ApiResource.requestCollection(url, params, WebhookEndpointCollection.class, options); } /** Retrieves the webhook endpoint with the given ID. */ @@ -119,7 +117,8 @@ public static WebhookEndpoint retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/webhook_endpoints/%s", ApiResource.urlEncodeId(webhookEndpoint))); - return request(ApiResource.RequestMethod.GET, url, params, WebhookEndpoint.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, WebhookEndpoint.class, options); } /** Retrieves the webhook endpoint with the given ID. */ @@ -131,7 +130,8 @@ public static WebhookEndpoint retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/webhook_endpoints/%s", ApiResource.urlEncodeId(webhookEndpoint))); - return request(ApiResource.RequestMethod.GET, url, params, WebhookEndpoint.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, WebhookEndpoint.class, options); } /** @@ -159,7 +159,8 @@ public static WebhookEndpoint create(Map params) throws StripeEx public static WebhookEndpoint create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/webhook_endpoints"); - return request(ApiResource.RequestMethod.POST, url, params, WebhookEndpoint.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, WebhookEndpoint.class, options); } /** @@ -187,7 +188,8 @@ public static WebhookEndpoint create(WebhookEndpointCreateParams params) throws public static WebhookEndpoint create(WebhookEndpointCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/webhook_endpoints"); - return request(ApiResource.RequestMethod.POST, url, params, WebhookEndpoint.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, WebhookEndpoint.class, options); } /** @@ -209,7 +211,8 @@ public WebhookEndpoint update(Map params, RequestOptions options "%s%s", Stripe.getApiBase(), String.format("/v1/webhook_endpoints/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, WebhookEndpoint.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, WebhookEndpoint.class, options); } /** @@ -231,7 +234,8 @@ public WebhookEndpoint update(WebhookEndpointUpdateParams params, RequestOptions "%s%s", Stripe.getApiBase(), String.format("/v1/webhook_endpoints/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, WebhookEndpoint.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, WebhookEndpoint.class, options); } /** @@ -273,6 +277,7 @@ public WebhookEndpoint delete(Map params, RequestOptions options "%s%s", Stripe.getApiBase(), String.format("/v1/webhook_endpoints/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, WebhookEndpoint.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, WebhookEndpoint.class, options); } } diff --git a/src/main/java/com/stripe/model/WebhookEndpointCollection.java b/src/main/java/com/stripe/model/WebhookEndpointCollection.java index ce0bca8ae14..376acc79292 100644 --- a/src/main/java/com/stripe/model/WebhookEndpointCollection.java +++ b/src/main/java/com/stripe/model/WebhookEndpointCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model; public class WebhookEndpointCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index b6e0cb62ae3..ed503a688c7 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.checkout; import com.google.gson.annotations.SerializedName; @@ -68,7 +66,7 @@ public class Session extends ApiResource implements HasId { /** The line items, plans, or SKUs purchased by the customer. */ @SerializedName("display_items") - List displayItems; + List displayItems; /** Unique identifier for the object. Used to pass to `redirectToCheckout` in Stripe.js. */ @Getter(onMethod_ = {@Override}) @@ -229,7 +227,7 @@ public static Session retrieve(String session, Map params, Reque "%s%s", Stripe.getApiBase(), String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(session))); - return request(ApiResource.RequestMethod.GET, url, params, Session.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Session.class, options); } /** Retrieves a Session object. */ @@ -240,7 +238,7 @@ public static Session retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(session))); - return request(ApiResource.RequestMethod.GET, url, params, Session.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Session.class, options); } /** Creates a Session object. */ @@ -252,7 +250,7 @@ public static Session create(Map params) throws StripeException public static Session create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/checkout/sessions"); - return request(ApiResource.RequestMethod.POST, url, params, Session.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Session.class, options); } /** Creates a Session object. */ @@ -264,7 +262,7 @@ public static Session create(SessionCreateParams params) throws StripeException public static Session create(SessionCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/checkout/sessions"); - return request(ApiResource.RequestMethod.POST, url, params, Session.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Session.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java index 5f74940f000..37fd327f4f3 100644 --- a/src/main/java/com/stripe/model/issuing/Authorization.java +++ b/src/main/java/com/stripe/model/issuing/Authorization.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.issuing; import com.google.gson.annotations.SerializedName; @@ -27,7 +25,7 @@ @Setter @EqualsAndHashCode(callSuper = false) public class Authorization extends ApiResource - implements BalanceTransactionSource, MetadataStore { + implements MetadataStore, BalanceTransactionSource { /** Whether the authorization has been approved. */ @SerializedName("approved") Boolean approved; @@ -132,7 +130,7 @@ public class Authorization extends ApiResource Long pendingHeldAmount; @SerializedName("request_history") - List requestHistory; + List requestHistory; /** One of `pending`, `reversed`, or `closed`. */ @SerializedName("status") @@ -184,7 +182,7 @@ public static AuthorizationCollection list(Map params) throws St public static AuthorizationCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/authorizations"); - return requestCollection(url, params, AuthorizationCollection.class, options); + return ApiResource.requestCollection(url, params, AuthorizationCollection.class, options); } /** @@ -203,7 +201,7 @@ public static AuthorizationCollection list(AuthorizationListParams params) public static AuthorizationCollection list(AuthorizationListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/authorizations"); - return requestCollection(url, params, AuthorizationCollection.class, options); + return ApiResource.requestCollection(url, params, AuthorizationCollection.class, options); } /** Retrieves an Issuing Authorization object. */ @@ -226,7 +224,8 @@ public static Authorization retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/authorizations/%s", ApiResource.urlEncodeId(authorization))); - return request(ApiResource.RequestMethod.GET, url, params, Authorization.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, Authorization.class, options); } /** Retrieves an Issuing Authorization object. */ @@ -238,7 +237,8 @@ public static Authorization retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/authorizations/%s", ApiResource.urlEncodeId(authorization))); - return request(ApiResource.RequestMethod.GET, url, params, Authorization.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, Authorization.class, options); } /** @@ -262,7 +262,8 @@ public Authorization update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/authorizations/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Authorization.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Authorization.class, options); } /** @@ -284,7 +285,8 @@ public Authorization update(AuthorizationUpdateParams params, RequestOptions opt "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/authorizations/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Authorization.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Authorization.class, options); } /** Approves a pending Issuing Authorization object. */ @@ -311,7 +313,8 @@ public Authorization approve(Map params, RequestOptions options) Stripe.getApiBase(), String.format( "/v1/issuing/authorizations/%s/approve", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Authorization.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Authorization.class, options); } /** Approves a pending Issuing Authorization object. */ @@ -328,7 +331,8 @@ public Authorization approve(AuthorizationApproveParams params, RequestOptions o Stripe.getApiBase(), String.format( "/v1/issuing/authorizations/%s/approve", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Authorization.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Authorization.class, options); } /** Declines a pending Issuing Authorization object. */ @@ -355,7 +359,8 @@ public Authorization decline(Map params, RequestOptions options) Stripe.getApiBase(), String.format( "/v1/issuing/authorizations/%s/decline", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Authorization.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Authorization.class, options); } /** Declines a pending Issuing Authorization object. */ @@ -372,7 +377,8 @@ public Authorization decline(AuthorizationDeclineParams params, RequestOptions o Stripe.getApiBase(), String.format( "/v1/issuing/authorizations/%s/decline", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Authorization.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Authorization.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/issuing/AuthorizationCollection.java b/src/main/java/com/stripe/model/issuing/AuthorizationCollection.java index bd6dc58cd02..2c494b6e913 100644 --- a/src/main/java/com/stripe/model/issuing/AuthorizationCollection.java +++ b/src/main/java/com/stripe/model/issuing/AuthorizationCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.issuing; import com.stripe.model.StripeCollection; diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java index 0b637954ad8..d0704829f5d 100644 --- a/src/main/java/com/stripe/model/issuing/Card.java +++ b/src/main/java/com/stripe/model/issuing/Card.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.issuing; import com.google.gson.annotations.SerializedName; @@ -154,7 +152,7 @@ public static CardCollection list(Map params) throws StripeExcep public static CardCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/cards"); - return requestCollection(url, params, CardCollection.class, options); + return ApiResource.requestCollection(url, params, CardCollection.class, options); } /** @@ -172,7 +170,7 @@ public static CardCollection list(CardListParams params) throws StripeException public static CardCollection list(CardListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/cards"); - return requestCollection(url, params, CardCollection.class, options); + return ApiResource.requestCollection(url, params, CardCollection.class, options); } /** Creates an Issuing Card object. */ @@ -184,7 +182,7 @@ public static Card create(Map params) throws StripeException { public static Card create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/cards"); - return request(ApiResource.RequestMethod.POST, url, params, Card.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Card.class, options); } /** Creates an Issuing Card object. */ @@ -196,7 +194,7 @@ public static Card create(CardCreateParams params) throws StripeException { public static Card create(CardCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/cards"); - return request(ApiResource.RequestMethod.POST, url, params, Card.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Card.class, options); } /** Retrieves an Issuing Card object. */ @@ -217,7 +215,7 @@ public static Card retrieve(String card, Map params, RequestOpti "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/cards/%s", ApiResource.urlEncodeId(card))); - return request(ApiResource.RequestMethod.GET, url, params, Card.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Card.class, options); } /** Retrieves an Issuing Card object. */ @@ -228,7 +226,7 @@ public static Card retrieve(String card, CardRetrieveParams params, RequestOptio "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/cards/%s", ApiResource.urlEncodeId(card))); - return request(ApiResource.RequestMethod.GET, url, params, Card.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Card.class, options); } /** @@ -251,7 +249,7 @@ public Card update(Map params, RequestOptions options) throws St "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/cards/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Card.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Card.class, options); } /** @@ -272,7 +270,7 @@ public Card update(CardUpdateParams params, RequestOptions options) throws Strip "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/cards/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Card.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Card.class, options); } /** @@ -305,7 +303,8 @@ public CardDetails details(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/cards/%s/details", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.GET, url, params, CardDetails.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, CardDetails.class, options); } /** @@ -329,7 +328,8 @@ public CardDetails details(CardDetailsParams params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/cards/%s/details", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.GET, url, params, CardDetails.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, CardDetails.class, options); } @Getter @@ -376,7 +376,7 @@ public static class AuthorizationControls extends StripeObject { /** Limit the spending with rules based on time intervals and categories. */ @SerializedName("spending_limits") - List spendingLimits; + List spendingLimits; /** Currency for the amounts within spending_limits. Locked to the currency of the card. */ @SerializedName("spending_limits_currency") diff --git a/src/main/java/com/stripe/model/issuing/CardCollection.java b/src/main/java/com/stripe/model/issuing/CardCollection.java index fdbffd99a0b..fd1db184b85 100644 --- a/src/main/java/com/stripe/model/issuing/CardCollection.java +++ b/src/main/java/com/stripe/model/issuing/CardCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.issuing; import com.stripe.model.StripeCollection; diff --git a/src/main/java/com/stripe/model/issuing/CardDetails.java b/src/main/java/com/stripe/model/issuing/CardDetails.java index db5274f20aa..121ca1e8233 100644 --- a/src/main/java/com/stripe/model/issuing/CardDetails.java +++ b/src/main/java/com/stripe/model/issuing/CardDetails.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.issuing; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/issuing/Cardholder.java b/src/main/java/com/stripe/model/issuing/Cardholder.java index 58e0f1bb32f..8c92308d6e0 100644 --- a/src/main/java/com/stripe/model/issuing/Cardholder.java +++ b/src/main/java/com/stripe/model/issuing/Cardholder.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.issuing; import com.google.gson.annotations.SerializedName; @@ -98,7 +96,7 @@ public static CardholderCollection list(Map params) throws Strip public static CardholderCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/cardholders"); - return requestCollection(url, params, CardholderCollection.class, options); + return ApiResource.requestCollection(url, params, CardholderCollection.class, options); } /** @@ -116,7 +114,7 @@ public static CardholderCollection list(CardholderListParams params) throws Stri public static CardholderCollection list(CardholderListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/cardholders"); - return requestCollection(url, params, CardholderCollection.class, options); + return ApiResource.requestCollection(url, params, CardholderCollection.class, options); } /** Creates a new Issuing Cardholder object that can be issued cards. */ @@ -128,7 +126,8 @@ public static Cardholder create(Map params) throws StripeExcepti public static Cardholder create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/cardholders"); - return request(ApiResource.RequestMethod.POST, url, params, Cardholder.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Cardholder.class, options); } /** Creates a new Issuing Cardholder object that can be issued cards. */ @@ -140,7 +139,8 @@ public static Cardholder create(CardholderCreateParams params) throws StripeExce public static Cardholder create(CardholderCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/cardholders"); - return request(ApiResource.RequestMethod.POST, url, params, Cardholder.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Cardholder.class, options); } /** Retrieves an Issuing Cardholder object. */ @@ -163,7 +163,8 @@ public static Cardholder retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/cardholders/%s", ApiResource.urlEncodeId(cardholder))); - return request(ApiResource.RequestMethod.GET, url, params, Cardholder.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, Cardholder.class, options); } /** Retrieves an Issuing Cardholder object. */ @@ -175,7 +176,8 @@ public static Cardholder retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/cardholders/%s", ApiResource.urlEncodeId(cardholder))); - return request(ApiResource.RequestMethod.GET, url, params, Cardholder.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, Cardholder.class, options); } /** @@ -199,7 +201,8 @@ public Cardholder update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/cardholders/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Cardholder.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Cardholder.class, options); } /** @@ -221,7 +224,8 @@ public Cardholder update(CardholderUpdateParams params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/cardholders/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Cardholder.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Cardholder.class, options); } @Getter @@ -246,7 +250,7 @@ public static class AuthorizationControls extends StripeObject { /** Limit the spending with rules based on time intervals and categories. */ @SerializedName("spending_limits") - List spendingLimits; + List spendingLimits; /** Currency for the amounts within spending_limits. */ @SerializedName("spending_limits_currency") diff --git a/src/main/java/com/stripe/model/issuing/CardholderCollection.java b/src/main/java/com/stripe/model/issuing/CardholderCollection.java index efe50d835f4..339050f06cb 100644 --- a/src/main/java/com/stripe/model/issuing/CardholderCollection.java +++ b/src/main/java/com/stripe/model/issuing/CardholderCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.issuing; import com.stripe.model.StripeCollection; diff --git a/src/main/java/com/stripe/model/issuing/Dispute.java b/src/main/java/com/stripe/model/issuing/Dispute.java index 5701ef43277..849ddb97321 100644 --- a/src/main/java/com/stripe/model/issuing/Dispute.java +++ b/src/main/java/com/stripe/model/issuing/Dispute.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.issuing; import com.google.gson.annotations.SerializedName; @@ -116,7 +114,7 @@ public static DisputeCollection list(Map params) throws StripeEx public static DisputeCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/disputes"); - return requestCollection(url, params, DisputeCollection.class, options); + return ApiResource.requestCollection(url, params, DisputeCollection.class, options); } /** @@ -134,7 +132,7 @@ public static DisputeCollection list(DisputeListParams params) throws StripeExce public static DisputeCollection list(DisputeListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/disputes"); - return requestCollection(url, params, DisputeCollection.class, options); + return ApiResource.requestCollection(url, params, DisputeCollection.class, options); } /** Creates an Issuing Dispute object. */ @@ -146,7 +144,7 @@ public static Dispute create(Map params) throws StripeException public static Dispute create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/disputes"); - return request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); } /** Creates an Issuing Dispute object. */ @@ -158,7 +156,7 @@ public static Dispute create(DisputeCreateParams params) throws StripeException public static Dispute create(DisputeCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/disputes"); - return request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); } /** @@ -181,7 +179,7 @@ public Dispute update(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/disputes/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); } /** @@ -202,7 +200,7 @@ public Dispute update(DisputeUpdateParams params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/disputes/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Dispute.class, options); } /** Retrieves an Issuing Dispute object. */ @@ -223,7 +221,7 @@ public static Dispute retrieve(String dispute, Map params, Reque "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/disputes/%s", ApiResource.urlEncodeId(dispute))); - return request(ApiResource.RequestMethod.GET, url, params, Dispute.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Dispute.class, options); } /** Retrieves an Issuing Dispute object. */ @@ -234,7 +232,7 @@ public static Dispute retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/disputes/%s", ApiResource.urlEncodeId(dispute))); - return request(ApiResource.RequestMethod.GET, url, params, Dispute.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Dispute.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/issuing/DisputeCollection.java b/src/main/java/com/stripe/model/issuing/DisputeCollection.java index 06a39d26e02..c9a533256ac 100644 --- a/src/main/java/com/stripe/model/issuing/DisputeCollection.java +++ b/src/main/java/com/stripe/model/issuing/DisputeCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.issuing; import com.stripe.model.StripeCollection; diff --git a/src/main/java/com/stripe/model/issuing/MerchantData.java b/src/main/java/com/stripe/model/issuing/MerchantData.java index 62d87638eef..89159ea9999 100644 --- a/src/main/java/com/stripe/model/issuing/MerchantData.java +++ b/src/main/java/com/stripe/model/issuing/MerchantData.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.issuing; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/issuing/Transaction.java b/src/main/java/com/stripe/model/issuing/Transaction.java index 8a95bd8a075..916cd61818d 100644 --- a/src/main/java/com/stripe/model/issuing/Transaction.java +++ b/src/main/java/com/stripe/model/issuing/Transaction.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.issuing; import com.google.gson.annotations.SerializedName; @@ -23,7 +21,7 @@ @Setter @EqualsAndHashCode(callSuper = false) public class Transaction extends ApiResource - implements BalanceTransactionSource, MetadataStore { + implements MetadataStore, BalanceTransactionSource { @SerializedName("amount") Long amount; @@ -212,7 +210,7 @@ public static TransactionCollection list(Map params) throws Stri public static TransactionCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/transactions"); - return requestCollection(url, params, TransactionCollection.class, options); + return ApiResource.requestCollection(url, params, TransactionCollection.class, options); } /** @@ -230,7 +228,7 @@ public static TransactionCollection list(TransactionListParams params) throws St public static TransactionCollection list(TransactionListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/issuing/transactions"); - return requestCollection(url, params, TransactionCollection.class, options); + return ApiResource.requestCollection(url, params, TransactionCollection.class, options); } /** Retrieves an Issuing Transaction object. */ @@ -253,7 +251,8 @@ public static Transaction retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/transactions/%s", ApiResource.urlEncodeId(transaction))); - return request(ApiResource.RequestMethod.GET, url, params, Transaction.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, Transaction.class, options); } /** Retrieves an Issuing Transaction object. */ @@ -265,7 +264,8 @@ public static Transaction retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/transactions/%s", ApiResource.urlEncodeId(transaction))); - return request(ApiResource.RequestMethod.GET, url, params, Transaction.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, Transaction.class, options); } /** @@ -289,7 +289,8 @@ public Transaction update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/transactions/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Transaction.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Transaction.class, options); } /** @@ -311,6 +312,7 @@ public Transaction update(TransactionUpdateParams params, RequestOptions options "%s%s", Stripe.getApiBase(), String.format("/v1/issuing/transactions/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Transaction.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Transaction.class, options); } } diff --git a/src/main/java/com/stripe/model/issuing/TransactionCollection.java b/src/main/java/com/stripe/model/issuing/TransactionCollection.java index 3caaa6ca964..3930f68d1cc 100644 --- a/src/main/java/com/stripe/model/issuing/TransactionCollection.java +++ b/src/main/java/com/stripe/model/issuing/TransactionCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.issuing; import com.stripe.model.StripeCollection; diff --git a/src/main/java/com/stripe/model/radar/EarlyFraudWarning.java b/src/main/java/com/stripe/model/radar/EarlyFraudWarning.java index 65b13a959b6..ffe2d8ba549 100644 --- a/src/main/java/com/stripe/model/radar/EarlyFraudWarning.java +++ b/src/main/java/com/stripe/model/radar/EarlyFraudWarning.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.radar; import com.google.gson.annotations.SerializedName; @@ -91,7 +89,7 @@ public static EarlyFraudWarningCollection list(Map params) public static EarlyFraudWarningCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/radar/early_fraud_warnings"); - return requestCollection(url, params, EarlyFraudWarningCollection.class, options); + return ApiResource.requestCollection(url, params, EarlyFraudWarningCollection.class, options); } /** Returns a list of early fraud warnings. */ @@ -104,7 +102,7 @@ public static EarlyFraudWarningCollection list(EarlyFraudWarningListParams param public static EarlyFraudWarningCollection list( EarlyFraudWarningListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/radar/early_fraud_warnings"); - return requestCollection(url, params, EarlyFraudWarningCollection.class, options); + return ApiResource.requestCollection(url, params, EarlyFraudWarningCollection.class, options); } /** @@ -143,7 +141,8 @@ public static EarlyFraudWarning retrieve( Stripe.getApiBase(), String.format( "/v1/radar/early_fraud_warnings/%s", ApiResource.urlEncodeId(earlyFraudWarning))); - return request(ApiResource.RequestMethod.GET, url, params, EarlyFraudWarning.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, EarlyFraudWarning.class, options); } /** @@ -161,6 +160,7 @@ public static EarlyFraudWarning retrieve( Stripe.getApiBase(), String.format( "/v1/radar/early_fraud_warnings/%s", ApiResource.urlEncodeId(earlyFraudWarning))); - return request(ApiResource.RequestMethod.GET, url, params, EarlyFraudWarning.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, EarlyFraudWarning.class, options); } } diff --git a/src/main/java/com/stripe/model/radar/EarlyFraudWarningCollection.java b/src/main/java/com/stripe/model/radar/EarlyFraudWarningCollection.java index e22faba5098..4bff9e6e91b 100644 --- a/src/main/java/com/stripe/model/radar/EarlyFraudWarningCollection.java +++ b/src/main/java/com/stripe/model/radar/EarlyFraudWarningCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.radar; import com.stripe.model.StripeCollection; diff --git a/src/main/java/com/stripe/model/radar/Rule.java b/src/main/java/com/stripe/model/radar/Rule.java index eb09a8d38ee..576249ec03c 100644 --- a/src/main/java/com/stripe/model/radar/Rule.java +++ b/src/main/java/com/stripe/model/radar/Rule.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.radar; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/com/stripe/model/radar/ValueList.java b/src/main/java/com/stripe/model/radar/ValueList.java index d30f349deb8..1afdb8906b7 100644 --- a/src/main/java/com/stripe/model/radar/ValueList.java +++ b/src/main/java/com/stripe/model/radar/ValueList.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.radar; import com.google.gson.annotations.SerializedName; @@ -92,7 +90,7 @@ public static ValueListCollection list(Map params) throws Stripe public static ValueListCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/radar/value_lists"); - return requestCollection(url, params, ValueListCollection.class, options); + return ApiResource.requestCollection(url, params, ValueListCollection.class, options); } /** @@ -110,7 +108,7 @@ public static ValueListCollection list(ValueListListParams params) throws Stripe public static ValueListCollection list(ValueListListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/radar/value_lists"); - return requestCollection(url, params, ValueListCollection.class, options); + return ApiResource.requestCollection(url, params, ValueListCollection.class, options); } /** Retrieves a ValueList object. */ @@ -132,7 +130,8 @@ public static ValueList retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/radar/value_lists/%s", ApiResource.urlEncodeId(valueList))); - return request(ApiResource.RequestMethod.GET, url, params, ValueList.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ValueList.class, options); } /** Retrieves a ValueList object. */ @@ -144,7 +143,8 @@ public static ValueList retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/radar/value_lists/%s", ApiResource.urlEncodeId(valueList))); - return request(ApiResource.RequestMethod.GET, url, params, ValueList.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ValueList.class, options); } /** Creates a new ValueList object, which can then be referenced in rules. */ @@ -156,7 +156,8 @@ public static ValueList create(Map params) throws StripeExceptio public static ValueList create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/radar/value_lists"); - return request(ApiResource.RequestMethod.POST, url, params, ValueList.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ValueList.class, options); } /** Creates a new ValueList object, which can then be referenced in rules. */ @@ -168,7 +169,8 @@ public static ValueList create(ValueListCreateParams params) throws StripeExcept public static ValueList create(ValueListCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/radar/value_lists"); - return request(ApiResource.RequestMethod.POST, url, params, ValueList.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ValueList.class, options); } /** @@ -192,7 +194,8 @@ public ValueList update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/radar/value_lists/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, ValueList.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ValueList.class, options); } /** @@ -214,7 +217,8 @@ public ValueList update(ValueListUpdateParams params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/radar/value_lists/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, ValueList.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ValueList.class, options); } /** @@ -252,6 +256,7 @@ public ValueList delete(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/radar/value_lists/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, ValueList.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, ValueList.class, options); } } diff --git a/src/main/java/com/stripe/model/radar/ValueListCollection.java b/src/main/java/com/stripe/model/radar/ValueListCollection.java index b0c323f363f..9c9d8262580 100644 --- a/src/main/java/com/stripe/model/radar/ValueListCollection.java +++ b/src/main/java/com/stripe/model/radar/ValueListCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.radar; import com.stripe.model.StripeCollection; diff --git a/src/main/java/com/stripe/model/radar/ValueListItem.java b/src/main/java/com/stripe/model/radar/ValueListItem.java index c7fd0f7d00d..9ff6d73a98f 100644 --- a/src/main/java/com/stripe/model/radar/ValueListItem.java +++ b/src/main/java/com/stripe/model/radar/ValueListItem.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.radar; import com.google.gson.annotations.SerializedName; @@ -71,7 +69,7 @@ public static ValueListItemCollection list(Map params) throws St public static ValueListItemCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/radar/value_list_items"); - return requestCollection(url, params, ValueListItemCollection.class, options); + return ApiResource.requestCollection(url, params, ValueListItemCollection.class, options); } /** @@ -90,7 +88,7 @@ public static ValueListItemCollection list(ValueListItemListParams params) public static ValueListItemCollection list(ValueListItemListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/radar/value_list_items"); - return requestCollection(url, params, ValueListItemCollection.class, options); + return ApiResource.requestCollection(url, params, ValueListItemCollection.class, options); } /** Retrieves a ValueListItem object. */ @@ -111,7 +109,8 @@ public static ValueListItem retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/radar/value_list_items/%s", ApiResource.urlEncodeId(item))); - return request(ApiResource.RequestMethod.GET, url, params, ValueListItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ValueListItem.class, options); } /** Retrieves a ValueListItem object. */ @@ -123,7 +122,8 @@ public static ValueListItem retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/radar/value_list_items/%s", ApiResource.urlEncodeId(item))); - return request(ApiResource.RequestMethod.GET, url, params, ValueListItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ValueListItem.class, options); } /** @@ -141,7 +141,8 @@ public static ValueListItem create(Map params) throws StripeExce public static ValueListItem create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/radar/value_list_items"); - return request(ApiResource.RequestMethod.POST, url, params, ValueListItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ValueListItem.class, options); } /** @@ -159,7 +160,8 @@ public static ValueListItem create(ValueListItemCreateParams params) throws Stri public static ValueListItem create(ValueListItemCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/radar/value_list_items"); - return request(ApiResource.RequestMethod.POST, url, params, ValueListItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ValueListItem.class, options); } /** Deletes a ValueListItem object, removing it from its parent value list. */ @@ -185,6 +187,7 @@ public ValueListItem delete(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/radar/value_list_items/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, ValueListItem.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, ValueListItem.class, options); } } diff --git a/src/main/java/com/stripe/model/radar/ValueListItemCollection.java b/src/main/java/com/stripe/model/radar/ValueListItemCollection.java index 93b0f85a093..0af1c3d2ddc 100644 --- a/src/main/java/com/stripe/model/radar/ValueListItemCollection.java +++ b/src/main/java/com/stripe/model/radar/ValueListItemCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.radar; import com.stripe.model.StripeCollection; diff --git a/src/main/java/com/stripe/model/reporting/ReportRun.java b/src/main/java/com/stripe/model/reporting/ReportRun.java index 9e136e78ae3..c75676d50ab 100644 --- a/src/main/java/com/stripe/model/reporting/ReportRun.java +++ b/src/main/java/com/stripe/model/reporting/ReportRun.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.reporting; import com.google.gson.annotations.SerializedName; @@ -107,7 +105,8 @@ public static ReportRun retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/reporting/report_runs/%s", ApiResource.urlEncodeId(reportRun))); - return request(ApiResource.RequestMethod.GET, url, params, ReportRun.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ReportRun.class, options); } /** @@ -122,7 +121,8 @@ public static ReportRun retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/reporting/report_runs/%s", ApiResource.urlEncodeId(reportRun))); - return request(ApiResource.RequestMethod.GET, url, params, ReportRun.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ReportRun.class, options); } /** @@ -140,7 +140,8 @@ public static ReportRun create(Map params) throws StripeExceptio public static ReportRun create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/reporting/report_runs"); - return request(ApiResource.RequestMethod.POST, url, params, ReportRun.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ReportRun.class, options); } /** @@ -158,7 +159,8 @@ public static ReportRun create(ReportRunCreateParams params) throws StripeExcept public static ReportRun create(ReportRunCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/reporting/report_runs"); - return request(ApiResource.RequestMethod.POST, url, params, ReportRun.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ReportRun.class, options); } /** @@ -176,7 +178,7 @@ public static ReportRunCollection list(Map params) throws Stripe public static ReportRunCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/reporting/report_runs"); - return requestCollection(url, params, ReportRunCollection.class, options); + return ApiResource.requestCollection(url, params, ReportRunCollection.class, options); } /** @@ -194,7 +196,7 @@ public static ReportRunCollection list(ReportRunListParams params) throws Stripe public static ReportRunCollection list(ReportRunListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/reporting/report_runs"); - return requestCollection(url, params, ReportRunCollection.class, options); + return ApiResource.requestCollection(url, params, ReportRunCollection.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/reporting/ReportRunCollection.java b/src/main/java/com/stripe/model/reporting/ReportRunCollection.java index ef4137eb9a8..384b4d47b98 100644 --- a/src/main/java/com/stripe/model/reporting/ReportRunCollection.java +++ b/src/main/java/com/stripe/model/reporting/ReportRunCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.reporting; import com.stripe.model.StripeCollection; diff --git a/src/main/java/com/stripe/model/reporting/ReportType.java b/src/main/java/com/stripe/model/reporting/ReportType.java index bbf6e6546dd..be73fedcd3a 100644 --- a/src/main/java/com/stripe/model/reporting/ReportType.java +++ b/src/main/java/com/stripe/model/reporting/ReportType.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.reporting; import com.google.gson.annotations.SerializedName; @@ -98,7 +96,8 @@ public static ReportType retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/reporting/report_types/%s", ApiResource.urlEncodeId(reportType))); - return request(ApiResource.RequestMethod.GET, url, params, ReportType.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ReportType.class, options); } /** @@ -113,7 +112,8 @@ public static ReportType retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/reporting/report_types/%s", ApiResource.urlEncodeId(reportType))); - return request(ApiResource.RequestMethod.GET, url, params, ReportType.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ReportType.class, options); } /** @@ -131,7 +131,7 @@ public static ReportTypeCollection list(Map params) throws Strip public static ReportTypeCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/reporting/report_types"); - return requestCollection(url, params, ReportTypeCollection.class, options); + return ApiResource.requestCollection(url, params, ReportTypeCollection.class, options); } /** @@ -149,6 +149,6 @@ public static ReportTypeCollection list(ReportTypeListParams params) throws Stri public static ReportTypeCollection list(ReportTypeListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/reporting/report_types"); - return requestCollection(url, params, ReportTypeCollection.class, options); + return ApiResource.requestCollection(url, params, ReportTypeCollection.class, options); } } diff --git a/src/main/java/com/stripe/model/reporting/ReportTypeCollection.java b/src/main/java/com/stripe/model/reporting/ReportTypeCollection.java index ede0bdaabb9..f677b98bc25 100644 --- a/src/main/java/com/stripe/model/reporting/ReportTypeCollection.java +++ b/src/main/java/com/stripe/model/reporting/ReportTypeCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.reporting; import com.stripe.model.StripeCollection; diff --git a/src/main/java/com/stripe/model/sigma/ScheduledQueryRun.java b/src/main/java/com/stripe/model/sigma/ScheduledQueryRun.java index 39357957f83..dc1e14fdc22 100644 --- a/src/main/java/com/stripe/model/sigma/ScheduledQueryRun.java +++ b/src/main/java/com/stripe/model/sigma/ScheduledQueryRun.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.sigma; import com.google.gson.annotations.SerializedName; @@ -81,7 +79,7 @@ public static ScheduledQueryRunCollection list(Map params) public static ScheduledQueryRunCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/sigma/scheduled_query_runs"); - return requestCollection(url, params, ScheduledQueryRunCollection.class, options); + return ApiResource.requestCollection(url, params, ScheduledQueryRunCollection.class, options); } /** Returns a list of scheduled query runs. */ @@ -94,7 +92,7 @@ public static ScheduledQueryRunCollection list(ScheduledQueryRunListParams param public static ScheduledQueryRunCollection list( ScheduledQueryRunListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/sigma/scheduled_query_runs"); - return requestCollection(url, params, ScheduledQueryRunCollection.class, options); + return ApiResource.requestCollection(url, params, ScheduledQueryRunCollection.class, options); } /** Retrieves the details of an scheduled query run. */ @@ -118,7 +116,8 @@ public static ScheduledQueryRun retrieve( Stripe.getApiBase(), String.format( "/v1/sigma/scheduled_query_runs/%s", ApiResource.urlEncodeId(scheduledQueryRun))); - return request(ApiResource.RequestMethod.GET, url, params, ScheduledQueryRun.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ScheduledQueryRun.class, options); } /** Retrieves the details of an scheduled query run. */ @@ -131,7 +130,8 @@ public static ScheduledQueryRun retrieve( Stripe.getApiBase(), String.format( "/v1/sigma/scheduled_query_runs/%s", ApiResource.urlEncodeId(scheduledQueryRun))); - return request(ApiResource.RequestMethod.GET, url, params, ScheduledQueryRun.class, options); + return ApiResource.request( + ApiResource.RequestMethod.GET, url, params, ScheduledQueryRun.class, options); } @Getter diff --git a/src/main/java/com/stripe/model/sigma/ScheduledQueryRunCollection.java b/src/main/java/com/stripe/model/sigma/ScheduledQueryRunCollection.java index 7a603575611..41f9ca7096d 100644 --- a/src/main/java/com/stripe/model/sigma/ScheduledQueryRunCollection.java +++ b/src/main/java/com/stripe/model/sigma/ScheduledQueryRunCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.sigma; import com.stripe.model.StripeCollection; diff --git a/src/main/java/com/stripe/model/terminal/ConnectionToken.java b/src/main/java/com/stripe/model/terminal/ConnectionToken.java index caa083e1ad9..5c8d8b9f1d4 100644 --- a/src/main/java/com/stripe/model/terminal/ConnectionToken.java +++ b/src/main/java/com/stripe/model/terminal/ConnectionToken.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.terminal; import com.google.gson.annotations.SerializedName; @@ -46,7 +44,8 @@ public static ConnectionToken create(Map params) throws StripeEx public static ConnectionToken create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/terminal/connection_tokens"); - return request(ApiResource.RequestMethod.POST, url, params, ConnectionToken.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ConnectionToken.class, options); } /** @@ -66,6 +65,7 @@ public static ConnectionToken create(ConnectionTokenCreateParams params) throws public static ConnectionToken create(ConnectionTokenCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/terminal/connection_tokens"); - return request(ApiResource.RequestMethod.POST, url, params, ConnectionToken.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, ConnectionToken.class, options); } } diff --git a/src/main/java/com/stripe/model/terminal/Location.java b/src/main/java/com/stripe/model/terminal/Location.java index e12c59ba51a..a76c70be5ad 100644 --- a/src/main/java/com/stripe/model/terminal/Location.java +++ b/src/main/java/com/stripe/model/terminal/Location.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.terminal; import com.google.gson.annotations.SerializedName; @@ -61,7 +59,7 @@ public static Location retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/terminal/locations/%s", ApiResource.urlEncodeId(location))); - return request(ApiResource.RequestMethod.GET, url, params, Location.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Location.class, options); } /** Retrieves a Location object. */ @@ -73,7 +71,7 @@ public static Location retrieve( "%s%s", Stripe.getApiBase(), String.format("/v1/terminal/locations/%s", ApiResource.urlEncodeId(location))); - return request(ApiResource.RequestMethod.GET, url, params, Location.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Location.class, options); } /** Creates a new Location object. */ @@ -85,7 +83,8 @@ public static Location create(Map params) throws StripeException public static Location create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/terminal/locations"); - return request(ApiResource.RequestMethod.POST, url, params, Location.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Location.class, options); } /** Creates a new Location object. */ @@ -97,7 +96,8 @@ public static Location create(LocationCreateParams params) throws StripeExceptio public static Location create(LocationCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/terminal/locations"); - return request(ApiResource.RequestMethod.POST, url, params, Location.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Location.class, options); } /** @@ -119,7 +119,8 @@ public Location update(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/terminal/locations/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Location.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Location.class, options); } /** @@ -141,7 +142,8 @@ public Location update(LocationUpdateParams params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/terminal/locations/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Location.class, options); + return ApiResource.request( + ApiResource.RequestMethod.POST, url, params, Location.class, options); } /** Returns a list of Location objects. */ @@ -153,7 +155,7 @@ public static LocationCollection list(Map params) throws StripeE public static LocationCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/terminal/locations"); - return requestCollection(url, params, LocationCollection.class, options); + return ApiResource.requestCollection(url, params, LocationCollection.class, options); } /** Returns a list of Location objects. */ @@ -165,7 +167,7 @@ public static LocationCollection list(LocationListParams params) throws StripeEx public static LocationCollection list(LocationListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/terminal/locations"); - return requestCollection(url, params, LocationCollection.class, options); + return ApiResource.requestCollection(url, params, LocationCollection.class, options); } /** Deletes a Location object. */ @@ -191,7 +193,8 @@ public Location delete(Map params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/terminal/locations/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Location.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Location.class, options); } /** Deletes a Location object. */ @@ -207,6 +210,7 @@ public Location delete(LocationDeleteParams params, RequestOptions options) "%s%s", Stripe.getApiBase(), String.format("/v1/terminal/locations/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Location.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Location.class, options); } } diff --git a/src/main/java/com/stripe/model/terminal/LocationCollection.java b/src/main/java/com/stripe/model/terminal/LocationCollection.java index bb46455f018..cce457e2be6 100644 --- a/src/main/java/com/stripe/model/terminal/LocationCollection.java +++ b/src/main/java/com/stripe/model/terminal/LocationCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.terminal; import com.stripe.model.StripeCollection; diff --git a/src/main/java/com/stripe/model/terminal/Reader.java b/src/main/java/com/stripe/model/terminal/Reader.java index 301abf45bbc..96e0e7b85a0 100644 --- a/src/main/java/com/stripe/model/terminal/Reader.java +++ b/src/main/java/com/stripe/model/terminal/Reader.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.terminal; import com.google.gson.annotations.SerializedName; @@ -81,7 +79,7 @@ public Reader update(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/terminal/readers/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Reader.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Reader.class, options); } /** @@ -102,7 +100,7 @@ public Reader update(ReaderUpdateParams params, RequestOptions options) throws S "%s%s", Stripe.getApiBase(), String.format("/v1/terminal/readers/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.POST, url, params, Reader.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Reader.class, options); } /** Retrieves a Reader object. */ @@ -123,7 +121,7 @@ public static Reader retrieve(String reader, Map params, Request "%s%s", Stripe.getApiBase(), String.format("/v1/terminal/readers/%s", ApiResource.urlEncodeId(reader))); - return request(ApiResource.RequestMethod.GET, url, params, Reader.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Reader.class, options); } /** Retrieves a Reader object. */ @@ -134,7 +132,7 @@ public static Reader retrieve(String reader, ReaderRetrieveParams params, Reques "%s%s", Stripe.getApiBase(), String.format("/v1/terminal/readers/%s", ApiResource.urlEncodeId(reader))); - return request(ApiResource.RequestMethod.GET, url, params, Reader.class, options); + return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Reader.class, options); } /** Creates a new Reader object. */ @@ -146,7 +144,7 @@ public static Reader create(Map params) throws StripeException { public static Reader create(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/terminal/readers"); - return request(ApiResource.RequestMethod.POST, url, params, Reader.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Reader.class, options); } /** Creates a new Reader object. */ @@ -158,7 +156,7 @@ public static Reader create(ReaderCreateParams params) throws StripeException { public static Reader create(ReaderCreateParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/terminal/readers"); - return request(ApiResource.RequestMethod.POST, url, params, Reader.class, options); + return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Reader.class, options); } /** Returns a list of Reader objects. */ @@ -170,7 +168,7 @@ public static ReaderCollection list(Map params) throws StripeExc public static ReaderCollection list(Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/terminal/readers"); - return requestCollection(url, params, ReaderCollection.class, options); + return ApiResource.requestCollection(url, params, ReaderCollection.class, options); } /** Returns a list of Reader objects. */ @@ -182,7 +180,7 @@ public static ReaderCollection list(ReaderListParams params) throws StripeExcept public static ReaderCollection list(ReaderListParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), "/v1/terminal/readers"); - return requestCollection(url, params, ReaderCollection.class, options); + return ApiResource.requestCollection(url, params, ReaderCollection.class, options); } /** Deletes a Reader object. */ @@ -207,7 +205,8 @@ public Reader delete(Map params, RequestOptions options) throws "%s%s", Stripe.getApiBase(), String.format("/v1/terminal/readers/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Reader.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Reader.class, options); } /** Deletes a Reader object. */ @@ -222,6 +221,7 @@ public Reader delete(ReaderDeleteParams params, RequestOptions options) throws S "%s%s", Stripe.getApiBase(), String.format("/v1/terminal/readers/%s", ApiResource.urlEncodeId(this.getId()))); - return request(ApiResource.RequestMethod.DELETE, url, params, Reader.class, options); + return ApiResource.request( + ApiResource.RequestMethod.DELETE, url, params, Reader.class, options); } } diff --git a/src/main/java/com/stripe/model/terminal/ReaderCollection.java b/src/main/java/com/stripe/model/terminal/ReaderCollection.java index 32e7c6807fa..fcfb6fbfaf1 100644 --- a/src/main/java/com/stripe/model/terminal/ReaderCollection.java +++ b/src/main/java/com/stripe/model/terminal/ReaderCollection.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.model.terminal; import com.stripe.model.StripeCollection; diff --git a/src/main/java/com/stripe/net/ApiResourceTypeAdapterFactoryProvider.java b/src/main/java/com/stripe/net/ApiResourceTypeAdapterFactoryProvider.java index ac3eb6113a3..8e5542d485c 100644 --- a/src/main/java/com/stripe/net/ApiResourceTypeAdapterFactoryProvider.java +++ b/src/main/java/com/stripe/net/ApiResourceTypeAdapterFactoryProvider.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.net; import com.google.gson.TypeAdapterFactory; @@ -16,8 +14,8 @@ final class ApiResourceTypeAdapterFactoryProvider { private static final List factories = new ArrayList<>(); static { - factories.add(new ExternalAccountTypeAdapterFactory()); factories.add(new BalanceTransactionSourceTypeAdapterFactory()); + factories.add(new ExternalAccountTypeAdapterFactory()); factories.add(new PaymentSourceTypeAdapterFactory()); } diff --git a/src/main/java/com/stripe/param/AccountCapabilitiesParams.java b/src/main/java/com/stripe/param/AccountCapabilitiesParams.java index 36efc8fea4b..f2cc0810daf 100644 --- a/src/main/java/com/stripe/param/AccountCapabilitiesParams.java +++ b/src/main/java/com/stripe/param/AccountCapabilitiesParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private AccountCapabilitiesParams(List expand, Map extra } public static Builder builder() { - return new com.stripe.param.AccountCapabilitiesParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index fbaa308af43..c30ba810c5c 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -160,7 +158,7 @@ private AccountCreateParams( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -495,7 +493,7 @@ private BusinessProfile( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.BusinessProfile.Builder(); + return new Builder(); } public static class Builder { @@ -706,7 +704,7 @@ private Company( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Company.Builder(); + return new Builder(); } public static class Builder { @@ -922,7 +920,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Company.Address.Builder(); + return new Builder(); } public static class Builder { @@ -1082,7 +1080,7 @@ private AddressKana( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Company.AddressKana.Builder(); + return new Builder(); } public static class Builder { @@ -1251,7 +1249,7 @@ private AddressKanji( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Company.AddressKanji.Builder(); + return new Builder(); } public static class Builder { @@ -1493,7 +1491,7 @@ private Individual( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Individual.Builder(); + return new Builder(); } public static class Builder { @@ -1779,7 +1777,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Individual.Address.Builder(); + return new Builder(); } public static class Builder { @@ -1939,7 +1937,7 @@ private AddressKana( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Individual.AddressKana.Builder(); + return new Builder(); } public static class Builder { @@ -2108,7 +2106,7 @@ private AddressKanji( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Individual.AddressKanji.Builder(); + return new Builder(); } public static class Builder { @@ -2246,7 +2244,7 @@ private Dob(Long day, Map extraParams, Long month, Long year) { } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Individual.Dob.Builder(); + return new Builder(); } public static class Builder { @@ -2331,7 +2329,7 @@ private Verification(Document document, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Individual.Verification.Builder(); + return new Builder(); } public static class Builder { @@ -2411,8 +2409,7 @@ private Document(String back, Map extraParams, String front) { } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Individual.Verification.Document - .Builder(); + return new Builder(); } public static class Builder { @@ -2520,7 +2517,7 @@ private Settings( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Settings.Builder(); + return new Builder(); } public static class Builder { @@ -2632,7 +2629,7 @@ private Branding( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Settings.Branding.Builder(); + return new Builder(); } public static class Builder { @@ -2738,7 +2735,7 @@ private CardPayments( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Settings.CardPayments.Builder(); + return new Builder(); } public static class Builder { @@ -2835,7 +2832,7 @@ private DeclineOn(Boolean avsFailure, Boolean cvcFailure, Map ex } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Settings.CardPayments.DeclineOn.Builder(); + return new Builder(); } public static class Builder { @@ -2943,7 +2940,7 @@ private Payments( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Settings.Payments.Builder(); + return new Builder(); } public static class Builder { @@ -3066,7 +3063,7 @@ private Payouts( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Settings.Payouts.Builder(); + return new Builder(); } public static class Builder { @@ -3200,7 +3197,7 @@ private Schedule( } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.Settings.Payouts.Schedule.Builder(); + return new Builder(); } public static class Builder { @@ -3404,7 +3401,7 @@ private TosAcceptance(Long date, Map extraParams, String ip, Str } public static Builder builder() { - return new com.stripe.param.AccountCreateParams.TosAcceptance.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/AccountLinkCreateParams.java b/src/main/java/com/stripe/param/AccountLinkCreateParams.java index 84a81ac377e..d95cc37d6ef 100644 --- a/src/main/java/com/stripe/param/AccountLinkCreateParams.java +++ b/src/main/java/com/stripe/param/AccountLinkCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -68,7 +66,7 @@ private AccountLinkCreateParams( } public static Builder builder() { - return new com.stripe.param.AccountLinkCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/AccountListParams.java b/src/main/java/com/stripe/param/AccountListParams.java index 102243c9699..96105b80065 100644 --- a/src/main/java/com/stripe/param/AccountListParams.java +++ b/src/main/java/com/stripe/param/AccountListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -67,7 +65,7 @@ private AccountListParams( } public static Builder builder() { - return new com.stripe.param.AccountListParams.Builder(); + return new Builder(); } public static class Builder { @@ -223,7 +221,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.AccountListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/AccountPersonsParams.java b/src/main/java/com/stripe/param/AccountPersonsParams.java index 674ed5375d3..2aa0eef09ab 100644 --- a/src/main/java/com/stripe/param/AccountPersonsParams.java +++ b/src/main/java/com/stripe/param/AccountPersonsParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -71,7 +69,7 @@ private AccountPersonsParams( } public static Builder builder() { - return new com.stripe.param.AccountPersonsParams.Builder(); + return new Builder(); } public static class Builder { @@ -243,7 +241,7 @@ private Relationship( } public static Builder builder() { - return new com.stripe.param.AccountPersonsParams.Relationship.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/AccountRejectParams.java b/src/main/java/com/stripe/param/AccountRejectParams.java index cfbc055b96f..b81ef44284e 100644 --- a/src/main/java/com/stripe/param/AccountRejectParams.java +++ b/src/main/java/com/stripe/param/AccountRejectParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -34,7 +32,7 @@ private AccountRejectParams(List expand, Map extraParams } public static Builder builder() { - return new com.stripe.param.AccountRejectParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/AccountRetrieveParams.java b/src/main/java/com/stripe/param/AccountRetrieveParams.java index 3be45ded460..7a87a7af677 100644 --- a/src/main/java/com/stripe/param/AccountRetrieveParams.java +++ b/src/main/java/com/stripe/param/AccountRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private AccountRetrieveParams(List expand, Map extraPara } public static Builder builder() { - return new com.stripe.param.AccountRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 9f114243eb8..702d5727c81 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -141,7 +139,7 @@ private AccountUpdateParams( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -451,7 +449,7 @@ private BusinessProfile( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.BusinessProfile.Builder(); + return new Builder(); } public static class Builder { @@ -662,7 +660,7 @@ private Company( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Company.Builder(); + return new Builder(); } public static class Builder { @@ -878,7 +876,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Company.Address.Builder(); + return new Builder(); } public static class Builder { @@ -1038,7 +1036,7 @@ private AddressKana( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Company.AddressKana.Builder(); + return new Builder(); } public static class Builder { @@ -1207,7 +1205,7 @@ private AddressKanji( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Company.AddressKanji.Builder(); + return new Builder(); } public static class Builder { @@ -1449,7 +1447,7 @@ private Individual( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Individual.Builder(); + return new Builder(); } public static class Builder { @@ -1735,7 +1733,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Individual.Address.Builder(); + return new Builder(); } public static class Builder { @@ -1895,7 +1893,7 @@ private AddressKana( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Individual.AddressKana.Builder(); + return new Builder(); } public static class Builder { @@ -2064,7 +2062,7 @@ private AddressKanji( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Individual.AddressKanji.Builder(); + return new Builder(); } public static class Builder { @@ -2202,7 +2200,7 @@ private Dob(Long day, Map extraParams, Long month, Long year) { } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Individual.Dob.Builder(); + return new Builder(); } public static class Builder { @@ -2287,7 +2285,7 @@ private Verification(Document document, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Individual.Verification.Builder(); + return new Builder(); } public static class Builder { @@ -2367,8 +2365,7 @@ private Document(String back, Map extraParams, String front) { } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Individual.Verification.Document - .Builder(); + return new Builder(); } public static class Builder { @@ -2476,7 +2473,7 @@ private Settings( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Settings.Builder(); + return new Builder(); } public static class Builder { @@ -2588,7 +2585,7 @@ private Branding( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Settings.Branding.Builder(); + return new Builder(); } public static class Builder { @@ -2694,7 +2691,7 @@ private CardPayments( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Settings.CardPayments.Builder(); + return new Builder(); } public static class Builder { @@ -2791,7 +2788,7 @@ private DeclineOn(Boolean avsFailure, Boolean cvcFailure, Map ex } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Settings.CardPayments.DeclineOn.Builder(); + return new Builder(); } public static class Builder { @@ -2899,7 +2896,7 @@ private Payments( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Settings.Payments.Builder(); + return new Builder(); } public static class Builder { @@ -3022,7 +3019,7 @@ private Payouts( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Settings.Payouts.Builder(); + return new Builder(); } public static class Builder { @@ -3156,7 +3153,7 @@ private Schedule( } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.Settings.Payouts.Schedule.Builder(); + return new Builder(); } public static class Builder { @@ -3360,7 +3357,7 @@ private TosAcceptance(Long date, Map extraParams, String ip, Str } public static Builder builder() { - return new com.stripe.param.AccountUpdateParams.TosAcceptance.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ApplePayDomainCreateParams.java b/src/main/java/com/stripe/param/ApplePayDomainCreateParams.java index d8cfa9a146b..8d65f198a44 100644 --- a/src/main/java/com/stripe/param/ApplePayDomainCreateParams.java +++ b/src/main/java/com/stripe/param/ApplePayDomainCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -34,7 +32,7 @@ private ApplePayDomainCreateParams( } public static Builder builder() { - return new com.stripe.param.ApplePayDomainCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ApplePayDomainListParams.java b/src/main/java/com/stripe/param/ApplePayDomainListParams.java index 48a7588ffa7..be58d957c51 100644 --- a/src/main/java/com/stripe/param/ApplePayDomainListParams.java +++ b/src/main/java/com/stripe/param/ApplePayDomainListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -67,7 +65,7 @@ private ApplePayDomainListParams( } public static Builder builder() { - return new com.stripe.param.ApplePayDomainListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ApplePayDomainRetrieveParams.java b/src/main/java/com/stripe/param/ApplePayDomainRetrieveParams.java index 2051f923999..65146b26e93 100644 --- a/src/main/java/com/stripe/param/ApplePayDomainRetrieveParams.java +++ b/src/main/java/com/stripe/param/ApplePayDomainRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ApplePayDomainRetrieveParams(List expand, Map ex } public static Builder builder() { - return new com.stripe.param.ApplePayDomainRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ApplicationFeeListParams.java b/src/main/java/com/stripe/param/ApplicationFeeListParams.java index d997ce60e1d..3d72961396b 100644 --- a/src/main/java/com/stripe/param/ApplicationFeeListParams.java +++ b/src/main/java/com/stripe/param/ApplicationFeeListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -73,7 +71,7 @@ private ApplicationFeeListParams( } public static Builder builder() { - return new com.stripe.param.ApplicationFeeListParams.Builder(); + return new Builder(); } public static class Builder { @@ -238,7 +236,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.ApplicationFeeListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ApplicationFeeRetrieveParams.java b/src/main/java/com/stripe/param/ApplicationFeeRetrieveParams.java index 126e3ff8797..462d2e30b42 100644 --- a/src/main/java/com/stripe/param/ApplicationFeeRetrieveParams.java +++ b/src/main/java/com/stripe/param/ApplicationFeeRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ApplicationFeeRetrieveParams(List expand, Map ex } public static Builder builder() { - return new com.stripe.param.ApplicationFeeRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/BalanceRetrieveParams.java b/src/main/java/com/stripe/param/BalanceRetrieveParams.java index 073020028e8..16bb6007a45 100644 --- a/src/main/java/com/stripe/param/BalanceRetrieveParams.java +++ b/src/main/java/com/stripe/param/BalanceRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private BalanceRetrieveParams(List expand, Map extraPara } public static Builder builder() { - return new com.stripe.param.BalanceRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/BalanceTransactionListParams.java b/src/main/java/com/stripe/param/BalanceTransactionListParams.java index 33540425273..05f1033d2de 100644 --- a/src/main/java/com/stripe/param/BalanceTransactionListParams.java +++ b/src/main/java/com/stripe/param/BalanceTransactionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -102,7 +100,7 @@ private BalanceTransactionListParams( } public static Builder builder() { - return new com.stripe.param.BalanceTransactionListParams.Builder(); + return new Builder(); } public static class Builder { @@ -313,7 +311,7 @@ private AvailableOn(Map extraParams, Long gt, Long gte, Long lt, } public static Builder builder() { - return new com.stripe.param.BalanceTransactionListParams.AvailableOn.Builder(); + return new Builder(); } public static class Builder { @@ -420,7 +418,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.BalanceTransactionListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/BalanceTransactionRetrieveParams.java b/src/main/java/com/stripe/param/BalanceTransactionRetrieveParams.java index 58682d5a98e..f7773a0a3af 100644 --- a/src/main/java/com/stripe/param/BalanceTransactionRetrieveParams.java +++ b/src/main/java/com/stripe/param/BalanceTransactionRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private BalanceTransactionRetrieveParams(List expand, Map expand, Map e } public static Builder builder() { - return new com.stripe.param.BitcoinReceiverRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/BitcoinTransactionCollectionListParams.java b/src/main/java/com/stripe/param/BitcoinTransactionCollectionListParams.java index bc3ca67c147..b2191b30955 100644 --- a/src/main/java/com/stripe/param/BitcoinTransactionCollectionListParams.java +++ b/src/main/java/com/stripe/param/BitcoinTransactionCollectionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -68,7 +66,7 @@ private BitcoinTransactionCollectionListParams( } public static Builder builder() { - return new com.stripe.param.BitcoinTransactionCollectionListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CapabilityCollectionListParams.java b/src/main/java/com/stripe/param/CapabilityCollectionListParams.java index 41b52e58a1d..a01cf8e5c2d 100644 --- a/src/main/java/com/stripe/param/CapabilityCollectionListParams.java +++ b/src/main/java/com/stripe/param/CapabilityCollectionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private CapabilityCollectionListParams(List expand, Map } public static Builder builder() { - return new com.stripe.param.CapabilityCollectionListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CapabilityCollectionRetrieveParams.java b/src/main/java/com/stripe/param/CapabilityCollectionRetrieveParams.java index 24cfb21c62d..6657b2e3ed6 100644 --- a/src/main/java/com/stripe/param/CapabilityCollectionRetrieveParams.java +++ b/src/main/java/com/stripe/param/CapabilityCollectionRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private CapabilityCollectionRetrieveParams(List expand, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.ChargeCaptureParams.TransferData.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ChargeCreateParams.java b/src/main/java/com/stripe/param/ChargeCreateParams.java index 70590e60074..b90b828e98a 100644 --- a/src/main/java/com/stripe/param/ChargeCreateParams.java +++ b/src/main/java/com/stripe/param/ChargeCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -197,7 +195,7 @@ private ChargeCreateParams( } public static Builder builder() { - return new com.stripe.param.ChargeCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -530,7 +528,7 @@ private Destination(String account, Long amount, Map extraParams } public static Builder builder() { - return new com.stripe.param.ChargeCreateParams.Destination.Builder(); + return new Builder(); } public static class Builder { @@ -638,7 +636,7 @@ private Shipping( } public static Builder builder() { - return new com.stripe.param.ChargeCreateParams.Shipping.Builder(); + return new Builder(); } public static class Builder { @@ -771,7 +769,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.ChargeCreateParams.Shipping.Address.Builder(); + return new Builder(); } public static class Builder { @@ -890,7 +888,7 @@ private TransferData(Long amount, String destination, Map extraP } public static Builder builder() { - return new com.stripe.param.ChargeCreateParams.TransferData.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ChargeListParams.java b/src/main/java/com/stripe/param/ChargeListParams.java index 5a6f26bdabd..1d4e60bec49 100644 --- a/src/main/java/com/stripe/param/ChargeListParams.java +++ b/src/main/java/com/stripe/param/ChargeListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -87,7 +85,7 @@ private ChargeListParams( } public static Builder builder() { - return new com.stripe.param.ChargeListParams.Builder(); + return new Builder(); } public static class Builder { @@ -273,7 +271,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.ChargeListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ChargeRetrieveParams.java b/src/main/java/com/stripe/param/ChargeRetrieveParams.java index 6303033b709..418f117fa25 100644 --- a/src/main/java/com/stripe/param/ChargeRetrieveParams.java +++ b/src/main/java/com/stripe/param/ChargeRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ChargeRetrieveParams(List expand, Map extraParam } public static Builder builder() { - return new com.stripe.param.ChargeRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ChargeUpdateParams.java b/src/main/java/com/stripe/param/ChargeUpdateParams.java index 1649857dce3..f395bc5f62b 100644 --- a/src/main/java/com/stripe/param/ChargeUpdateParams.java +++ b/src/main/java/com/stripe/param/ChargeUpdateParams.java @@ -1,9 +1,8 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiRequestParams.EnumParam; import com.stripe.param.common.EmptyParam; import java.util.ArrayList; import java.util.HashMap; @@ -100,7 +99,7 @@ private ChargeUpdateParams( } public static Builder builder() { - return new com.stripe.param.ChargeUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -283,21 +282,21 @@ public static class FraudDetails { Map extraParams; @SerializedName("user_report") - ApiRequestParams.EnumParam userReport; + EnumParam userReport; - private FraudDetails(Map extraParams, ApiRequestParams.EnumParam userReport) { + private FraudDetails(Map extraParams, EnumParam userReport) { this.extraParams = extraParams; this.userReport = userReport; } public static Builder builder() { - return new com.stripe.param.ChargeUpdateParams.FraudDetails.Builder(); + return new Builder(); } public static class Builder { private Map extraParams; - private ApiRequestParams.EnumParam userReport; + private EnumParam userReport; /** Finalize and obtain parameter instance from this builder. */ public FraudDetails build() { @@ -330,12 +329,12 @@ public Builder putAllExtraParam(Map map) { return this; } - public Builder setUserReport(UserReport userReport) { + public Builder setUserReport(EmptyParam userReport) { this.userReport = userReport; return this; } - public Builder setUserReport(EmptyParam userReport) { + public Builder setUserReport(UserReport userReport) { this.userReport = userReport; return this; } @@ -406,7 +405,7 @@ private Shipping( } public static Builder builder() { - return new com.stripe.param.ChargeUpdateParams.Shipping.Builder(); + return new Builder(); } public static class Builder { @@ -539,7 +538,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.ChargeUpdateParams.Shipping.Address.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CountrySpecListParams.java b/src/main/java/com/stripe/param/CountrySpecListParams.java index a665cfdf6cb..3da9a3d1c5a 100644 --- a/src/main/java/com/stripe/param/CountrySpecListParams.java +++ b/src/main/java/com/stripe/param/CountrySpecListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private CountrySpecListParams( } public static Builder builder() { - return new com.stripe.param.CountrySpecListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CountrySpecRetrieveParams.java b/src/main/java/com/stripe/param/CountrySpecRetrieveParams.java index cc35b6d0805..df5f101dee7 100644 --- a/src/main/java/com/stripe/param/CountrySpecRetrieveParams.java +++ b/src/main/java/com/stripe/param/CountrySpecRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private CountrySpecRetrieveParams(List expand, Map extra } public static Builder builder() { - return new com.stripe.param.CountrySpecRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CouponCreateParams.java b/src/main/java/com/stripe/param/CouponCreateParams.java index c5db64bc05d..a01e06563f1 100644 --- a/src/main/java/com/stripe/param/CouponCreateParams.java +++ b/src/main/java/com/stripe/param/CouponCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -125,7 +123,7 @@ private CouponCreateParams( } public static Builder builder() { - return new com.stripe.param.CouponCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CouponListParams.java b/src/main/java/com/stripe/param/CouponListParams.java index 74cff1997f5..b224fb9eac9 100644 --- a/src/main/java/com/stripe/param/CouponListParams.java +++ b/src/main/java/com/stripe/param/CouponListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -71,7 +69,7 @@ private CouponListParams( } public static Builder builder() { - return new com.stripe.param.CouponListParams.Builder(); + return new Builder(); } public static class Builder { @@ -235,7 +233,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.CouponListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CouponRetrieveParams.java b/src/main/java/com/stripe/param/CouponRetrieveParams.java index 9c92adc8b27..a78980036e1 100644 --- a/src/main/java/com/stripe/param/CouponRetrieveParams.java +++ b/src/main/java/com/stripe/param/CouponRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private CouponRetrieveParams(List expand, Map extraParam } public static Builder builder() { - return new com.stripe.param.CouponRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CouponUpdateParams.java b/src/main/java/com/stripe/param/CouponUpdateParams.java index f28f476ab4e..d96b06190c8 100644 --- a/src/main/java/com/stripe/param/CouponUpdateParams.java +++ b/src/main/java/com/stripe/param/CouponUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -49,7 +47,7 @@ private CouponUpdateParams( } public static Builder builder() { - return new com.stripe.param.CouponUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CreditNoteCreateParams.java b/src/main/java/com/stripe/param/CreditNoteCreateParams.java index d272933a146..f9b30a0e9cc 100644 --- a/src/main/java/com/stripe/param/CreditNoteCreateParams.java +++ b/src/main/java/com/stripe/param/CreditNoteCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -93,7 +91,7 @@ private CreditNoteCreateParams( } public static Builder builder() { - return new com.stripe.param.CreditNoteCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CreditNoteListParams.java b/src/main/java/com/stripe/param/CreditNoteListParams.java index f43deb7dc2d..2e11a513856 100644 --- a/src/main/java/com/stripe/param/CreditNoteListParams.java +++ b/src/main/java/com/stripe/param/CreditNoteListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -74,7 +72,7 @@ private CreditNoteListParams( } public static Builder builder() { - return new com.stripe.param.CreditNoteListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CreditNoteRetrieveParams.java b/src/main/java/com/stripe/param/CreditNoteRetrieveParams.java index 3e875c0a75c..b1555a230ea 100644 --- a/src/main/java/com/stripe/param/CreditNoteRetrieveParams.java +++ b/src/main/java/com/stripe/param/CreditNoteRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private CreditNoteRetrieveParams(List expand, Map extraP } public static Builder builder() { - return new com.stripe.param.CreditNoteRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CreditNoteUpdateParams.java b/src/main/java/com/stripe/param/CreditNoteUpdateParams.java index a5ad2096e0e..a0aaa188e90 100644 --- a/src/main/java/com/stripe/param/CreditNoteUpdateParams.java +++ b/src/main/java/com/stripe/param/CreditNoteUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -47,7 +45,7 @@ private CreditNoteUpdateParams( } public static Builder builder() { - return new com.stripe.param.CreditNoteUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CreditNoteVoidCreditNoteParams.java b/src/main/java/com/stripe/param/CreditNoteVoidCreditNoteParams.java index 4842e163cbd..7e0511f9380 100644 --- a/src/main/java/com/stripe/param/CreditNoteVoidCreditNoteParams.java +++ b/src/main/java/com/stripe/param/CreditNoteVoidCreditNoteParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private CreditNoteVoidCreditNoteParams(List expand, Map } public static Builder builder() { - return new com.stripe.param.CreditNoteVoidCreditNoteParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionCreateParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionCreateParams.java index 5f8f9a2c54b..5bcaeca1962 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -67,7 +65,7 @@ private CustomerBalanceTransactionCollectionCreateParams( } public static Builder builder() { - return new com.stripe.param.CustomerBalanceTransactionCollectionCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java index 4547c50ecec..13279297274 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private CustomerBalanceTransactionCollectionListParams( } public static Builder builder() { - return new com.stripe.param.CustomerBalanceTransactionCollectionListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionRetrieveParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionRetrieveParams.java index 1c629ff03e8..614d0c452f4 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionRetrieveParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -30,7 +28,7 @@ private CustomerBalanceTransactionCollectionRetrieveParams( } public static Builder builder() { - return new com.stripe.param.CustomerBalanceTransactionCollectionRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionUpdateParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionUpdateParams.java index 6cf470953f9..cf77af6d37d 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionUpdateParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -46,7 +44,7 @@ private CustomerBalanceTransactionUpdateParams( } public static Builder builder() { - return new com.stripe.param.CustomerBalanceTransactionUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java index fbcfd4adfbe..815909965f4 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private CustomerBalanceTransactionsParams( } public static Builder builder() { - return new com.stripe.param.CustomerBalanceTransactionsParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CustomerCreateParams.java b/src/main/java/com/stripe/param/CustomerCreateParams.java index fdc9b2324d4..d9879a64bdc 100644 --- a/src/main/java/com/stripe/param/CustomerCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerCreateParams.java @@ -1,9 +1,8 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiRequestParams.EnumParam; import com.stripe.param.common.EmptyParam; import java.util.ArrayList; import java.util.HashMap; @@ -100,7 +99,7 @@ public class CustomerCreateParams extends ApiRequestParams { /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ @SerializedName("tax_exempt") - ApiRequestParams.EnumParam taxExempt; + EnumParam taxExempt; /** The customer's tax IDs. */ @SerializedName("tax_id_data") @@ -133,7 +132,7 @@ private CustomerCreateParams( List preferredLocales, Object shipping, String source, - ApiRequestParams.EnumParam taxExempt, + EnumParam taxExempt, List taxIdData, TaxInfo taxInfo) { this.accountBalance = accountBalance; @@ -159,7 +158,7 @@ private CustomerCreateParams( } public static Builder builder() { - return new com.stripe.param.CustomerCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -197,7 +196,7 @@ public static class Builder { private String source; - private ApiRequestParams.EnumParam taxExempt; + private EnumParam taxExempt; private List taxIdData; @@ -433,13 +432,13 @@ public Builder setSource(String source) { } /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ - public Builder setTaxExempt(TaxExempt taxExempt) { + public Builder setTaxExempt(EmptyParam taxExempt) { this.taxExempt = taxExempt; return this; } /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ - public Builder setTaxExempt(EmptyParam taxExempt) { + public Builder setTaxExempt(TaxExempt taxExempt) { this.taxExempt = taxExempt; return this; } @@ -528,7 +527,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.CustomerCreateParams.Address.Builder(); + return new Builder(); } public static class Builder { @@ -650,7 +649,7 @@ private InvoiceSettings( } public static Builder builder() { - return new com.stripe.param.CustomerCreateParams.InvoiceSettings.Builder(); + return new Builder(); } public static class Builder { @@ -669,13 +668,13 @@ public InvoiceSettings build() { } /** Default custom fields to be displayed on invoices for this customer. */ - public Builder setCustomFields(EmptyParam customFields) { + public Builder setCustomFields(List customFields) { this.customFields = customFields; return this; } /** Default custom fields to be displayed on invoices for this customer. */ - public Builder setCustomFields(List customFields) { + public Builder setCustomFields(EmptyParam customFields) { this.customFields = customFields; return this; } @@ -744,7 +743,7 @@ private CustomField(Map extraParams, String name, String value) } public static Builder builder() { - return new com.stripe.param.CustomerCreateParams.InvoiceSettings.CustomField.Builder(); + return new Builder(); } public static class Builder { @@ -832,7 +831,7 @@ private Shipping(Address address, Map extraParams, String name, } public static Builder builder() { - return new com.stripe.param.CustomerCreateParams.Shipping.Builder(); + return new Builder(); } public static class Builder { @@ -940,7 +939,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.CustomerCreateParams.Shipping.Address.Builder(); + return new Builder(); } public static class Builder { @@ -1056,7 +1055,7 @@ private TaxIdData(Map extraParams, Type type, String value) { } public static Builder builder() { - return new com.stripe.param.CustomerCreateParams.TaxIdData.Builder(); + return new Builder(); } public static class Builder { @@ -1160,7 +1159,7 @@ private TaxInfo(Map extraParams, String taxId, Type type) { } public static Builder builder() { - return new com.stripe.param.CustomerCreateParams.TaxInfo.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CustomerListParams.java b/src/main/java/com/stripe/param/CustomerListParams.java index 31141608a9a..aab2b30051f 100644 --- a/src/main/java/com/stripe/param/CustomerListParams.java +++ b/src/main/java/com/stripe/param/CustomerListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -73,7 +71,7 @@ private CustomerListParams( } public static Builder builder() { - return new com.stripe.param.CustomerListParams.Builder(); + return new Builder(); } public static class Builder { @@ -238,7 +236,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.CustomerListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CustomerRetrieveParams.java b/src/main/java/com/stripe/param/CustomerRetrieveParams.java index 86a4cc5b9f4..a6274b71348 100644 --- a/src/main/java/com/stripe/param/CustomerRetrieveParams.java +++ b/src/main/java/com/stripe/param/CustomerRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private CustomerRetrieveParams(List expand, Map extraPar } public static Builder builder() { - return new com.stripe.param.CustomerRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/CustomerUpdateParams.java b/src/main/java/com/stripe/param/CustomerUpdateParams.java index cfca4977154..d620046f2ec 100644 --- a/src/main/java/com/stripe/param/CustomerUpdateParams.java +++ b/src/main/java/com/stripe/param/CustomerUpdateParams.java @@ -1,9 +1,8 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiRequestParams.EnumParam; import com.stripe.param.common.EmptyParam; import java.util.ArrayList; import java.util.HashMap; @@ -105,7 +104,7 @@ public class CustomerUpdateParams extends ApiRequestParams { /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ @SerializedName("tax_exempt") - ApiRequestParams.EnumParam taxExempt; + EnumParam taxExempt; /** * The customer's tax information. Appears on invoices emailed to this customer. This parameter @@ -144,7 +143,7 @@ private CustomerUpdateParams( List preferredLocales, Object shipping, String source, - ApiRequestParams.EnumParam taxExempt, + EnumParam taxExempt, TaxInfo taxInfo, Object trialEnd) { this.accountBalance = accountBalance; @@ -170,7 +169,7 @@ private CustomerUpdateParams( } public static Builder builder() { - return new com.stripe.param.CustomerUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -208,7 +207,7 @@ public static class Builder { private String source; - private ApiRequestParams.EnumParam taxExempt; + private EnumParam taxExempt; private TaxInfo taxInfo; @@ -450,13 +449,13 @@ public Builder setSource(String source) { } /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ - public Builder setTaxExempt(TaxExempt taxExempt) { + public Builder setTaxExempt(EmptyParam taxExempt) { this.taxExempt = taxExempt; return this; } /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ - public Builder setTaxExempt(EmptyParam taxExempt) { + public Builder setTaxExempt(TaxExempt taxExempt) { this.taxExempt = taxExempt; return this; } @@ -543,7 +542,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.CustomerUpdateParams.Address.Builder(); + return new Builder(); } public static class Builder { @@ -665,7 +664,7 @@ private InvoiceSettings( } public static Builder builder() { - return new com.stripe.param.CustomerUpdateParams.InvoiceSettings.Builder(); + return new Builder(); } public static class Builder { @@ -684,13 +683,13 @@ public InvoiceSettings build() { } /** Default custom fields to be displayed on invoices for this customer. */ - public Builder setCustomFields(EmptyParam customFields) { + public Builder setCustomFields(List customFields) { this.customFields = customFields; return this; } /** Default custom fields to be displayed on invoices for this customer. */ - public Builder setCustomFields(List customFields) { + public Builder setCustomFields(EmptyParam customFields) { this.customFields = customFields; return this; } @@ -759,7 +758,7 @@ private CustomField(Map extraParams, String name, String value) } public static Builder builder() { - return new com.stripe.param.CustomerUpdateParams.InvoiceSettings.CustomField.Builder(); + return new Builder(); } public static class Builder { @@ -847,7 +846,7 @@ private Shipping(Address address, Map extraParams, String name, } public static Builder builder() { - return new com.stripe.param.CustomerUpdateParams.Shipping.Builder(); + return new Builder(); } public static class Builder { @@ -955,7 +954,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.CustomerUpdateParams.Shipping.Address.Builder(); + return new Builder(); } public static class Builder { @@ -1071,7 +1070,7 @@ private TaxInfo(Map extraParams, String taxId, Type type) { } public static Builder builder() { - return new com.stripe.param.CustomerUpdateParams.TaxInfo.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/DisputeCloseParams.java b/src/main/java/com/stripe/param/DisputeCloseParams.java index 9d562002211..96424db2ec9 100644 --- a/src/main/java/com/stripe/param/DisputeCloseParams.java +++ b/src/main/java/com/stripe/param/DisputeCloseParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private DisputeCloseParams(List expand, Map extraParams) } public static Builder builder() { - return new com.stripe.param.DisputeCloseParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/DisputeListParams.java b/src/main/java/com/stripe/param/DisputeListParams.java index 3f214049f76..3a1d46e7cc0 100644 --- a/src/main/java/com/stripe/param/DisputeListParams.java +++ b/src/main/java/com/stripe/param/DisputeListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -67,7 +65,7 @@ private DisputeListParams( } public static Builder builder() { - return new com.stripe.param.DisputeListParams.Builder(); + return new Builder(); } public static class Builder { @@ -223,7 +221,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.DisputeListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/DisputeRetrieveParams.java b/src/main/java/com/stripe/param/DisputeRetrieveParams.java index c79453fab75..07deff54013 100644 --- a/src/main/java/com/stripe/param/DisputeRetrieveParams.java +++ b/src/main/java/com/stripe/param/DisputeRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private DisputeRetrieveParams(List expand, Map extraPara } public static Builder builder() { - return new com.stripe.param.DisputeRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/DisputeUpdateParams.java b/src/main/java/com/stripe/param/DisputeUpdateParams.java index 530b7654fb5..03acae756ff 100644 --- a/src/main/java/com/stripe/param/DisputeUpdateParams.java +++ b/src/main/java/com/stripe/param/DisputeUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -60,7 +58,7 @@ private DisputeUpdateParams( } public static Builder builder() { - return new com.stripe.param.DisputeUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -338,7 +336,7 @@ private Evidence( } public static Builder builder() { - return new com.stripe.param.DisputeUpdateParams.Evidence.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ExchangeRateListParams.java b/src/main/java/com/stripe/param/ExchangeRateListParams.java index ae843acfb97..06a769b4990 100644 --- a/src/main/java/com/stripe/param/ExchangeRateListParams.java +++ b/src/main/java/com/stripe/param/ExchangeRateListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private ExchangeRateListParams( } public static Builder builder() { - return new com.stripe.param.ExchangeRateListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ExchangeRateRetrieveParams.java b/src/main/java/com/stripe/param/ExchangeRateRetrieveParams.java index c3254d512a6..1fc515a2fd5 100644 --- a/src/main/java/com/stripe/param/ExchangeRateRetrieveParams.java +++ b/src/main/java/com/stripe/param/ExchangeRateRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ExchangeRateRetrieveParams(List expand, Map extr } public static Builder builder() { - return new com.stripe.param.ExchangeRateRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ExternalAccountCollectionCreateParams.java b/src/main/java/com/stripe/param/ExternalAccountCollectionCreateParams.java index 06fef71adec..3db64e661ae 100644 --- a/src/main/java/com/stripe/param/ExternalAccountCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/ExternalAccountCollectionCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -55,7 +53,7 @@ private ExternalAccountCollectionCreateParams( } public static Builder builder() { - return new com.stripe.param.ExternalAccountCollectionCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ExternalAccountCollectionListParams.java b/src/main/java/com/stripe/param/ExternalAccountCollectionListParams.java index e27b3c2d883..107d3f27850 100644 --- a/src/main/java/com/stripe/param/ExternalAccountCollectionListParams.java +++ b/src/main/java/com/stripe/param/ExternalAccountCollectionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private ExternalAccountCollectionListParams( } public static Builder builder() { - return new com.stripe.param.ExternalAccountCollectionListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ExternalAccountCollectionRetrieveParams.java b/src/main/java/com/stripe/param/ExternalAccountCollectionRetrieveParams.java index 0a36b077747..f7f37fd2b63 100644 --- a/src/main/java/com/stripe/param/ExternalAccountCollectionRetrieveParams.java +++ b/src/main/java/com/stripe/param/ExternalAccountCollectionRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -30,7 +28,7 @@ private ExternalAccountCollectionRetrieveParams( } public static Builder builder() { - return new com.stripe.param.ExternalAccountCollectionRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ExternalAccountUpdateParams.java b/src/main/java/com/stripe/param/ExternalAccountUpdateParams.java index 7277b5359c2..d9aaf672577 100644 --- a/src/main/java/com/stripe/param/ExternalAccountUpdateParams.java +++ b/src/main/java/com/stripe/param/ExternalAccountUpdateParams.java @@ -1,9 +1,8 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiRequestParams.EnumParam; import com.stripe.param.common.EmptyParam; import java.util.ArrayList; import java.util.HashMap; @@ -18,7 +17,7 @@ public class ExternalAccountUpdateParams extends ApiRequestParams { /** The type of entity that holds the account. This can be either `individual` or `company`. */ @SerializedName("account_holder_type") - ApiRequestParams.EnumParam accountHolderType; + EnumParam accountHolderType; /** City/District/Suburb/Town/Village. */ @SerializedName("address_city") @@ -78,7 +77,7 @@ public class ExternalAccountUpdateParams extends ApiRequestParams { private ExternalAccountUpdateParams( String accountHolderName, - ApiRequestParams.EnumParam accountHolderType, + EnumParam accountHolderType, String addressCity, String addressCountry, String addressLine1, @@ -110,13 +109,13 @@ private ExternalAccountUpdateParams( } public static Builder builder() { - return new com.stripe.param.ExternalAccountUpdateParams.Builder(); + return new Builder(); } public static class Builder { private String accountHolderName; - private ApiRequestParams.EnumParam accountHolderType; + private EnumParam accountHolderType; private String addressCity; @@ -171,13 +170,13 @@ public Builder setAccountHolderName(String accountHolderName) { } /** The type of entity that holds the account. This can be either `individual` or `company`. */ - public Builder setAccountHolderType(AccountHolderType accountHolderType) { + public Builder setAccountHolderType(EmptyParam accountHolderType) { this.accountHolderType = accountHolderType; return this; } /** The type of entity that holds the account. This can be either `individual` or `company`. */ - public Builder setAccountHolderType(EmptyParam accountHolderType) { + public Builder setAccountHolderType(AccountHolderType accountHolderType) { this.accountHolderType = accountHolderType; return this; } diff --git a/src/main/java/com/stripe/param/FeeRefundCollectionCreateParams.java b/src/main/java/com/stripe/param/FeeRefundCollectionCreateParams.java index 5cafa8032bf..df4407feb5b 100644 --- a/src/main/java/com/stripe/param/FeeRefundCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/FeeRefundCollectionCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -50,7 +48,7 @@ private FeeRefundCollectionCreateParams( } public static Builder builder() { - return new com.stripe.param.FeeRefundCollectionCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/FeeRefundCollectionListParams.java b/src/main/java/com/stripe/param/FeeRefundCollectionListParams.java index cd0499c903d..14865d46aa2 100644 --- a/src/main/java/com/stripe/param/FeeRefundCollectionListParams.java +++ b/src/main/java/com/stripe/param/FeeRefundCollectionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private FeeRefundCollectionListParams( } public static Builder builder() { - return new com.stripe.param.FeeRefundCollectionListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/FeeRefundCollectionRetrieveParams.java b/src/main/java/com/stripe/param/FeeRefundCollectionRetrieveParams.java index 79a93c5b97b..d324e0706a1 100644 --- a/src/main/java/com/stripe/param/FeeRefundCollectionRetrieveParams.java +++ b/src/main/java/com/stripe/param/FeeRefundCollectionRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private FeeRefundCollectionRetrieveParams(List expand, Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.FileLinkListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/FileLinkRetrieveParams.java b/src/main/java/com/stripe/param/FileLinkRetrieveParams.java index a3811be6f4a..b7179d37e89 100644 --- a/src/main/java/com/stripe/param/FileLinkRetrieveParams.java +++ b/src/main/java/com/stripe/param/FileLinkRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private FileLinkRetrieveParams(List expand, Map extraPar } public static Builder builder() { - return new com.stripe.param.FileLinkRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/FileLinkUpdateParams.java b/src/main/java/com/stripe/param/FileLinkUpdateParams.java index 6e811e8d833..46dadbdf4c4 100644 --- a/src/main/java/com/stripe/param/FileLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/FileLinkUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -51,7 +49,7 @@ private FileLinkUpdateParams( } public static Builder builder() { - return new com.stripe.param.FileLinkUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -107,7 +105,7 @@ public Builder setExpiresAt(ExpiresAt expiresAt) { * A future timestamp after which the link will no longer be usable, or `now` to expire the link * immediately. */ - public Builder setExpiresAt(EmptyParam expiresAt) { + public Builder setExpiresAt(Long expiresAt) { this.expiresAt = expiresAt; return this; } @@ -116,7 +114,7 @@ public Builder setExpiresAt(EmptyParam expiresAt) { * A future timestamp after which the link will no longer be usable, or `now` to expire the link * immediately. */ - public Builder setExpiresAt(Long expiresAt) { + public Builder setExpiresAt(EmptyParam expiresAt) { this.expiresAt = expiresAt; return this; } diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index 0e7f086c313..2dfbc5864c8 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -188,7 +186,7 @@ private InvoiceCreateParams( } public static Builder builder() { - return new com.stripe.param.InvoiceCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -299,13 +297,13 @@ public Builder setCollectionMethod(CollectionMethod collectionMethod) { } /** A list of up to 4 custom fields to be displayed on the invoice. */ - public Builder setCustomFields(EmptyParam customFields) { + public Builder setCustomFields(List 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) { + public Builder setCustomFields(EmptyParam customFields) { this.customFields = customFields; return this; } @@ -537,7 +535,7 @@ private CustomField(Map extraParams, String name, String value) } public static Builder builder() { - return new com.stripe.param.InvoiceCreateParams.CustomField.Builder(); + return new Builder(); } public static class Builder { @@ -612,7 +610,7 @@ private TransferData(String destination, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.InvoiceCreateParams.TransferData.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoiceFinalizeInvoiceParams.java b/src/main/java/com/stripe/param/InvoiceFinalizeInvoiceParams.java index 8146f834302..8069d2d6241 100644 --- a/src/main/java/com/stripe/param/InvoiceFinalizeInvoiceParams.java +++ b/src/main/java/com/stripe/param/InvoiceFinalizeInvoiceParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -39,7 +37,7 @@ private InvoiceFinalizeInvoiceParams( } public static Builder builder() { - return new com.stripe.param.InvoiceFinalizeInvoiceParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoiceItemCreateParams.java b/src/main/java/com/stripe/param/InvoiceItemCreateParams.java index 5c88b82e8d0..c4b16596f32 100644 --- a/src/main/java/com/stripe/param/InvoiceItemCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceItemCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -12,8 +10,8 @@ public class InvoiceItemCreateParams extends ApiRequestParams { /** - * The integer amount in **%s** of the charge to be applied to the upcoming invoice. If you want - * to apply a credit to the customer's account, pass a negative amount. + * The integer amount in **%s** of the charge to be applied to the upcoming invoice. Passing in a + * negative `amount` will reduce the `amount_due` on the invoice. */ @SerializedName("amount") Long amount; @@ -97,8 +95,8 @@ public class InvoiceItemCreateParams extends ApiRequestParams { /** * The integer unit amount in **%s** of the charge to be applied to the upcoming invoice. This - * unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a - * credit to the customer's account, pass a negative unit_amount. + * `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative + * `unit_amount` will reduce the `amount_due` on the invoice. */ @SerializedName("unit_amount") Long unitAmount; @@ -144,7 +142,7 @@ private InvoiceItemCreateParams( } public static Builder builder() { - return new com.stripe.param.InvoiceItemCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -199,8 +197,8 @@ public InvoiceItemCreateParams build() { } /** - * The integer amount in **%s** of the charge to be applied to the upcoming invoice. If you want - * to apply a credit to the customer's account, pass a negative amount. + * The integer amount in **%s** of the charge to be applied to the upcoming invoice. Passing in + * a negative `amount` will reduce the `amount_due` on the invoice. */ public Builder setAmount(Long amount) { this.amount = amount; @@ -381,8 +379,8 @@ public Builder addAllTaxRate(List elements) { /** * The integer unit amount in **%s** of the charge to be applied to the upcoming invoice. This - * unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a - * credit to the customer's account, pass a negative unit_amount. + * `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a + * negative `unit_amount` will reduce the `amount_due` on the invoice. */ public Builder setUnitAmount(Long unitAmount) { this.unitAmount = unitAmount; @@ -424,7 +422,7 @@ private Period(Long end, Map extraParams, Long start) { } public static Builder builder() { - return new com.stripe.param.InvoiceItemCreateParams.Period.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoiceItemListParams.java b/src/main/java/com/stripe/param/InvoiceItemListParams.java index ca76b350ad9..3ca0e6ba0a7 100644 --- a/src/main/java/com/stripe/param/InvoiceItemListParams.java +++ b/src/main/java/com/stripe/param/InvoiceItemListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -95,7 +93,7 @@ private InvoiceItemListParams( } public static Builder builder() { - return new com.stripe.param.InvoiceItemListParams.Builder(); + return new Builder(); } public static class Builder { @@ -288,7 +286,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.InvoiceItemListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoiceItemRetrieveParams.java b/src/main/java/com/stripe/param/InvoiceItemRetrieveParams.java index 0da9c13fe1f..b11025d0639 100644 --- a/src/main/java/com/stripe/param/InvoiceItemRetrieveParams.java +++ b/src/main/java/com/stripe/param/InvoiceItemRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private InvoiceItemRetrieveParams(List expand, Map extra } public static Builder builder() { - return new com.stripe.param.InvoiceItemRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java index 11af652f412..fe02a5a95ed 100644 --- a/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -110,7 +108,7 @@ private InvoiceItemUpdateParams( } public static Builder builder() { - return new com.stripe.param.InvoiceItemUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -274,7 +272,7 @@ public Builder setQuantity(Long quantity) { * The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the * invoice do not apply to this invoice item. */ - public Builder setTaxRates(EmptyParam taxRates) { + public Builder setTaxRates(List taxRates) { this.taxRates = taxRates; return this; } @@ -283,7 +281,7 @@ public Builder setTaxRates(EmptyParam taxRates) { * The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the * invoice do not apply to this invoice item. */ - public Builder setTaxRates(List taxRates) { + public Builder setTaxRates(EmptyParam taxRates) { this.taxRates = taxRates; return this; } @@ -333,7 +331,7 @@ private Period(Long end, Map extraParams, Long start) { } public static Builder builder() { - return new com.stripe.param.InvoiceItemUpdateParams.Period.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoiceLineItemCollectionListParams.java b/src/main/java/com/stripe/param/InvoiceLineItemCollectionListParams.java index 84611733580..95b72fbdcbe 100644 --- a/src/main/java/com/stripe/param/InvoiceLineItemCollectionListParams.java +++ b/src/main/java/com/stripe/param/InvoiceLineItemCollectionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private InvoiceLineItemCollectionListParams( } public static Builder builder() { - return new com.stripe.param.InvoiceLineItemCollectionListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoiceListParams.java b/src/main/java/com/stripe/param/InvoiceListParams.java index b8c0aaf971e..c0ca841a74b 100644 --- a/src/main/java/com/stripe/param/InvoiceListParams.java +++ b/src/main/java/com/stripe/param/InvoiceListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -111,7 +109,7 @@ private InvoiceListParams( } public static Builder builder() { - return new com.stripe.param.InvoiceListParams.Builder(); + return new Builder(); } public static class Builder { @@ -334,7 +332,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.InvoiceListParams.Created.Builder(); + return new Builder(); } public static class Builder { @@ -440,7 +438,7 @@ private DueDate(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.InvoiceListParams.DueDate.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoiceMarkUncollectibleParams.java b/src/main/java/com/stripe/param/InvoiceMarkUncollectibleParams.java index 3c161c2c2c0..5a7f3cac609 100644 --- a/src/main/java/com/stripe/param/InvoiceMarkUncollectibleParams.java +++ b/src/main/java/com/stripe/param/InvoiceMarkUncollectibleParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private InvoiceMarkUncollectibleParams(List expand, Map } public static Builder builder() { - return new com.stripe.param.InvoiceMarkUncollectibleParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoicePayParams.java b/src/main/java/com/stripe/param/InvoicePayParams.java index 28f3ee356b2..05c6afced6c 100644 --- a/src/main/java/com/stripe/param/InvoicePayParams.java +++ b/src/main/java/com/stripe/param/InvoicePayParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -79,7 +77,7 @@ private InvoicePayParams( } public static Builder builder() { - return new com.stripe.param.InvoicePayParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoiceRetrieveParams.java b/src/main/java/com/stripe/param/InvoiceRetrieveParams.java index 2fdfdb7411a..3acef5c584f 100644 --- a/src/main/java/com/stripe/param/InvoiceRetrieveParams.java +++ b/src/main/java/com/stripe/param/InvoiceRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private InvoiceRetrieveParams(List expand, Map extraPara } public static Builder builder() { - return new com.stripe.param.InvoiceRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoiceSendInvoiceParams.java b/src/main/java/com/stripe/param/InvoiceSendInvoiceParams.java index bd947abb858..057d4f97b02 100644 --- a/src/main/java/com/stripe/param/InvoiceSendInvoiceParams.java +++ b/src/main/java/com/stripe/param/InvoiceSendInvoiceParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private InvoiceSendInvoiceParams(List expand, Map extraP } public static Builder builder() { - return new com.stripe.param.InvoiceSendInvoiceParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoiceUpcomingParams.java b/src/main/java/com/stripe/param/InvoiceUpcomingParams.java index d94664c6aa8..99ba9d25007 100644 --- a/src/main/java/com/stripe/param/InvoiceUpcomingParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpcomingParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -188,7 +186,7 @@ private InvoiceUpcomingParams( } public static Builder builder() { - return new com.stripe.param.InvoiceUpcomingParams.Builder(); + return new Builder(); } public static class Builder { @@ -400,7 +398,7 @@ public Builder setSubscriptionBillingCycleAnchor(Long subscriptionBillingCycleAn * Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if * within the current period if `prorate=true` */ - public Builder setSubscriptionCancelAt(EmptyParam subscriptionCancelAt) { + public Builder setSubscriptionCancelAt(Long subscriptionCancelAt) { this.subscriptionCancelAt = subscriptionCancelAt; return this; } @@ -409,7 +407,7 @@ public Builder setSubscriptionCancelAt(EmptyParam subscriptionCancelAt) { * Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if * within the current period if `prorate=true` */ - public Builder setSubscriptionCancelAt(Long subscriptionCancelAt) { + public Builder setSubscriptionCancelAt(EmptyParam subscriptionCancelAt) { this.subscriptionCancelAt = subscriptionCancelAt; return this; } @@ -433,7 +431,7 @@ public Builder setSubscriptionCancelNow(Boolean subscriptionCancelNow) { * default tax rates. The default tax rates will apply to any line item that does not have * `tax_rates` set. */ - public Builder setSubscriptionDefaultTaxRates(EmptyParam subscriptionDefaultTaxRates) { + public Builder setSubscriptionDefaultTaxRates(List subscriptionDefaultTaxRates) { this.subscriptionDefaultTaxRates = subscriptionDefaultTaxRates; return this; } @@ -443,7 +441,7 @@ public Builder setSubscriptionDefaultTaxRates(EmptyParam subscriptionDefaultTaxR * default tax rates. The default tax rates will apply to any line item that does not have * `tax_rates` set. */ - public Builder setSubscriptionDefaultTaxRates(List subscriptionDefaultTaxRates) { + public Builder setSubscriptionDefaultTaxRates(EmptyParam subscriptionDefaultTaxRates) { this.subscriptionDefaultTaxRates = subscriptionDefaultTaxRates; return this; } @@ -647,7 +645,7 @@ private InvoiceItem( } public static Builder builder() { - return new com.stripe.param.InvoiceUpcomingParams.InvoiceItem.Builder(); + return new Builder(); } public static class Builder { @@ -799,12 +797,12 @@ public Builder setQuantity(Long quantity) { return this; } - public Builder setTaxRates(EmptyParam taxRates) { + public Builder setTaxRates(List taxRates) { this.taxRates = taxRates; return this; } - public Builder setTaxRates(List taxRates) { + public Builder setTaxRates(EmptyParam taxRates) { this.taxRates = taxRates; return this; } @@ -854,7 +852,7 @@ private Period(Long end, Map extraParams, Long start) { } public static Builder builder() { - return new com.stripe.param.InvoiceUpcomingParams.InvoiceItem.Period.Builder(); + return new Builder(); } public static class Builder { @@ -988,7 +986,7 @@ private SubscriptionItem( } public static Builder builder() { - return new com.stripe.param.InvoiceUpcomingParams.SubscriptionItem.Builder(); + return new Builder(); } public static class Builder { @@ -1131,7 +1129,7 @@ public Builder setQuantity(Long quantity) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on * the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(EmptyParam taxRates) { + public Builder setTaxRates(List taxRates) { this.taxRates = taxRates; return this; } @@ -1140,7 +1138,7 @@ public Builder setTaxRates(EmptyParam taxRates) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on * the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(List taxRates) { + public Builder setTaxRates(EmptyParam taxRates) { this.taxRates = taxRates; return this; } @@ -1166,8 +1164,7 @@ private BillingThresholds(Map extraParams, Long usageGte) { } public static Builder builder() { - return new com.stripe.param.InvoiceUpcomingParams.SubscriptionItem.BillingThresholds - .Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index 9fc1668d1f5..fb1f04d0ac6 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -168,7 +166,7 @@ private InvoiceUpdateParams( } public static Builder builder() { - return new com.stripe.param.InvoiceUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -262,7 +260,7 @@ public Builder setCollectionMethod(CollectionMethod collectionMethod) { * `custom_fields` is specified, the list specified will replace the existing custom field list * on this invoice. */ - public Builder setCustomFields(EmptyParam customFields) { + public Builder setCustomFields(List customFields) { this.customFields = customFields; return this; } @@ -272,7 +270,7 @@ public Builder setCustomFields(EmptyParam customFields) { * `custom_fields` is specified, the list specified will replace the existing custom field list * on this invoice. */ - public Builder setCustomFields(List customFields) { + public Builder setCustomFields(EmptyParam customFields) { this.customFields = customFields; return this; } @@ -310,7 +308,7 @@ public Builder setDefaultSource(String defaultSource) { * The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an * empty string to remove previously-set default tax rates. */ - public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { + public Builder setDefaultTaxRates(List defaultTaxRates) { this.defaultTaxRates = defaultTaxRates; return this; } @@ -319,7 +317,7 @@ public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { * The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an * empty string to remove previously-set default tax rates. */ - public Builder setDefaultTaxRates(List defaultTaxRates) { + public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { this.defaultTaxRates = defaultTaxRates; return this; } @@ -440,7 +438,7 @@ public Builder setStatementDescriptor(String statementDescriptor) { * deprecated and will be removed in a future API version, for further information view the * [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - public Builder setTaxPercent(EmptyParam taxPercent) { + public Builder setTaxPercent(BigDecimal taxPercent) { this.taxPercent = taxPercent; return this; } @@ -452,7 +450,7 @@ public Builder setTaxPercent(EmptyParam taxPercent) { * deprecated and will be removed in a future API version, for further information view the * [migration docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - public Builder setTaxPercent(BigDecimal taxPercent) { + public Builder setTaxPercent(EmptyParam taxPercent) { this.taxPercent = taxPercent; return this; } @@ -503,7 +501,7 @@ private CustomField(Map extraParams, String name, String value) } public static Builder builder() { - return new com.stripe.param.InvoiceUpdateParams.CustomField.Builder(); + return new Builder(); } public static class Builder { @@ -578,7 +576,7 @@ private TransferData(String destination, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.InvoiceUpdateParams.TransferData.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/InvoiceVoidInvoiceParams.java b/src/main/java/com/stripe/param/InvoiceVoidInvoiceParams.java index d77e689be56..dd8e492854d 100644 --- a/src/main/java/com/stripe/param/InvoiceVoidInvoiceParams.java +++ b/src/main/java/com/stripe/param/InvoiceVoidInvoiceParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private InvoiceVoidInvoiceParams(List expand, Map extraP } public static Builder builder() { - return new com.stripe.param.InvoiceVoidInvoiceParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/IssuerFraudRecordListParams.java b/src/main/java/com/stripe/param/IssuerFraudRecordListParams.java index a4cd237cae1..0c9fd053236 100644 --- a/src/main/java/com/stripe/param/IssuerFraudRecordListParams.java +++ b/src/main/java/com/stripe/param/IssuerFraudRecordListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -68,7 +66,7 @@ private IssuerFraudRecordListParams( } public static Builder builder() { - return new com.stripe.param.IssuerFraudRecordListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/IssuerFraudRecordRetrieveParams.java b/src/main/java/com/stripe/param/IssuerFraudRecordRetrieveParams.java index 9e92f13c51e..0b71d1d907a 100644 --- a/src/main/java/com/stripe/param/IssuerFraudRecordRetrieveParams.java +++ b/src/main/java/com/stripe/param/IssuerFraudRecordRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private IssuerFraudRecordRetrieveParams(List expand, Map } public static Builder builder() { - return new com.stripe.param.IssuerFraudRecordRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/LoginLinkCreateOnAccountParams.java b/src/main/java/com/stripe/param/LoginLinkCreateOnAccountParams.java index 46790adf185..3e941e4cbda 100644 --- a/src/main/java/com/stripe/param/LoginLinkCreateOnAccountParams.java +++ b/src/main/java/com/stripe/param/LoginLinkCreateOnAccountParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -35,7 +33,7 @@ private LoginLinkCreateOnAccountParams( } public static Builder builder() { - return new com.stripe.param.LoginLinkCreateOnAccountParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/OrderCreateParams.java b/src/main/java/com/stripe/param/OrderCreateParams.java index e73c616cc45..95bb131cc04 100644 --- a/src/main/java/com/stripe/param/OrderCreateParams.java +++ b/src/main/java/com/stripe/param/OrderCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -92,7 +90,7 @@ private OrderCreateParams( } public static Builder builder() { - return new com.stripe.param.OrderCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -328,7 +326,7 @@ private Item( } public static Builder builder() { - return new com.stripe.param.OrderCreateParams.Item.Builder(); + return new Builder(); } public static class Builder { @@ -472,7 +470,7 @@ private Shipping(Address address, Map extraParams, String name, } public static Builder builder() { - return new com.stripe.param.OrderCreateParams.Shipping.Builder(); + return new Builder(); } public static class Builder { @@ -580,7 +578,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.OrderCreateParams.Shipping.Address.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/OrderListParams.java b/src/main/java/com/stripe/param/OrderListParams.java index 98955d54bd5..c31e79ff2e2 100644 --- a/src/main/java/com/stripe/param/OrderListParams.java +++ b/src/main/java/com/stripe/param/OrderListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -101,7 +99,7 @@ private OrderListParams( } public static Builder builder() { - return new com.stripe.param.OrderListParams.Builder(); + return new Builder(); } public static class Builder { @@ -347,7 +345,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.OrderListParams.Created.Builder(); + return new Builder(); } public static class Builder { @@ -458,7 +456,7 @@ private StatusTransitions( } public static Builder builder() { - return new com.stripe.param.OrderListParams.StatusTransitions.Builder(); + return new Builder(); } public static class Builder { @@ -588,7 +586,7 @@ private Canceled(Map extraParams, Long gt, Long gte, Long lt, Lo } public static Builder builder() { - return new com.stripe.param.OrderListParams.StatusTransitions.Canceled.Builder(); + return new Builder(); } public static class Builder { @@ -696,7 +694,7 @@ private Fulfilled(Map extraParams, Long gt, Long gte, Long lt, L } public static Builder builder() { - return new com.stripe.param.OrderListParams.StatusTransitions.Fulfilled.Builder(); + return new Builder(); } public static class Builder { @@ -804,7 +802,7 @@ private Paid(Map extraParams, Long gt, Long gte, Long lt, Long l } public static Builder builder() { - return new com.stripe.param.OrderListParams.StatusTransitions.Paid.Builder(); + return new Builder(); } public static class Builder { @@ -912,7 +910,7 @@ private Returned(Map extraParams, Long gt, Long gte, Long lt, Lo } public static Builder builder() { - return new com.stripe.param.OrderListParams.StatusTransitions.Returned.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/OrderPayParams.java b/src/main/java/com/stripe/param/OrderPayParams.java index 62b87b14c6f..7f45154239e 100644 --- a/src/main/java/com/stripe/param/OrderPayParams.java +++ b/src/main/java/com/stripe/param/OrderPayParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -77,7 +75,7 @@ private OrderPayParams( } public static Builder builder() { - return new com.stripe.param.OrderPayParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/OrderRetrieveParams.java b/src/main/java/com/stripe/param/OrderRetrieveParams.java index 48a7be1f062..6122c3be804 100644 --- a/src/main/java/com/stripe/param/OrderRetrieveParams.java +++ b/src/main/java/com/stripe/param/OrderRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private OrderRetrieveParams(List expand, Map extraParams } public static Builder builder() { - return new com.stripe.param.OrderRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/OrderReturnListParams.java b/src/main/java/com/stripe/param/OrderReturnListParams.java index bf8a5b4bd18..4c256467a64 100644 --- a/src/main/java/com/stripe/param/OrderReturnListParams.java +++ b/src/main/java/com/stripe/param/OrderReturnListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -74,7 +72,7 @@ private OrderReturnListParams( } public static Builder builder() { - return new com.stripe.param.OrderReturnListParams.Builder(); + return new Builder(); } public static class Builder { @@ -241,7 +239,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.OrderReturnListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/OrderReturnOrderParams.java b/src/main/java/com/stripe/param/OrderReturnOrderParams.java index 106b8035c84..b5880de0315 100644 --- a/src/main/java/com/stripe/param/OrderReturnOrderParams.java +++ b/src/main/java/com/stripe/param/OrderReturnOrderParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -37,7 +35,7 @@ private OrderReturnOrderParams( } public static Builder builder() { - return new com.stripe.param.OrderReturnOrderParams.Builder(); + return new Builder(); } public static class Builder { @@ -105,13 +103,13 @@ public Builder putAllExtraParam(Map map) { } /** List of items to return. */ - public Builder setItems(EmptyParam items) { + public Builder setItems(List items) { this.items = items; return this; } /** List of items to return. */ - public Builder setItems(List items) { + public Builder setItems(EmptyParam items) { this.items = items; return this; } @@ -163,7 +161,7 @@ private Item( } public static Builder builder() { - return new com.stripe.param.OrderReturnOrderParams.Item.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/OrderReturnRetrieveParams.java b/src/main/java/com/stripe/param/OrderReturnRetrieveParams.java index f1ff3762efe..2eb2a84d8f8 100644 --- a/src/main/java/com/stripe/param/OrderReturnRetrieveParams.java +++ b/src/main/java/com/stripe/param/OrderReturnRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private OrderReturnRetrieveParams(List expand, Map extra } public static Builder builder() { - return new com.stripe.param.OrderReturnRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/OrderUpdateParams.java b/src/main/java/com/stripe/param/OrderUpdateParams.java index 2ac1f96790e..292190d936e 100644 --- a/src/main/java/com/stripe/param/OrderUpdateParams.java +++ b/src/main/java/com/stripe/param/OrderUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -76,7 +74,7 @@ private OrderUpdateParams( } public static Builder builder() { - return new com.stripe.param.OrderUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -245,7 +243,7 @@ private Shipping(String carrier, Map extraParams, String trackin } public static Builder builder() { - return new com.stripe.param.OrderUpdateParams.Shipping.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentIntentCancelParams.java b/src/main/java/com/stripe/param/PaymentIntentCancelParams.java index 6ff66b2285b..2b5c3bcf8b1 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCancelParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCancelParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -39,7 +37,7 @@ private PaymentIntentCancelParams( } public static Builder builder() { - return new com.stripe.param.PaymentIntentCancelParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index 348cdc9979f..3f794c72337 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -81,7 +79,7 @@ private PaymentIntentCaptureParams( } public static Builder builder() { - return new com.stripe.param.PaymentIntentCaptureParams.Builder(); + return new Builder(); } public static class Builder { @@ -235,7 +233,7 @@ private TransferData(Long amount, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.PaymentIntentCaptureParams.TransferData.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 812bdd63f6d..5a3418cecbb 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -1,9 +1,8 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiRequestParams.EnumParam; import com.stripe.param.common.EmptyParam; import java.util.ArrayList; import java.util.HashMap; @@ -92,7 +91,7 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { * key, you may only update the value from `on_session` to `off_session`. */ @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + EnumParam setupFutureUsage; /** Shipping information for this PaymentIntent. */ @SerializedName("shipping") @@ -115,7 +114,7 @@ private PaymentIntentConfirmParams( Object receiptEmail, String returnUrl, Boolean savePaymentMethod, - ApiRequestParams.EnumParam setupFutureUsage, + EnumParam setupFutureUsage, Object shipping, String source) { this.expand = expand; @@ -132,7 +131,7 @@ private PaymentIntentConfirmParams( } public static Builder builder() { - return new com.stripe.param.PaymentIntentConfirmParams.Builder(); + return new Builder(); } public static class Builder { @@ -152,7 +151,7 @@ public static class Builder { private Boolean savePaymentMethod; - private ApiRequestParams.EnumParam setupFutureUsage; + private EnumParam setupFutureUsage; private Object shipping; @@ -232,7 +231,7 @@ public Builder putAllExtraParam(Map map) { * where you collect card details and [charge them * later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ - public Builder setOffSession(OffSession offSession) { + public Builder setOffSession(Boolean offSession) { this.offSession = offSession; return this; } @@ -243,7 +242,7 @@ public Builder setOffSession(OffSession offSession) { * where you collect card details and [charge them * later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ - public Builder setOffSession(Boolean offSession) { + public Builder setOffSession(OffSession offSession) { this.offSession = offSession; return this; } @@ -264,13 +263,13 @@ public Builder setPaymentMethodOptions(PaymentMethodOptions paymentMethodOptions } /** Email address that the receipt for the resulting payment will be sent to. */ - public Builder setReceiptEmail(EmptyParam receiptEmail) { + public Builder setReceiptEmail(String receiptEmail) { this.receiptEmail = receiptEmail; return this; } /** Email address that the receipt for the resulting payment will be sent to. */ - public Builder setReceiptEmail(String receiptEmail) { + public Builder setReceiptEmail(EmptyParam receiptEmail) { this.receiptEmail = receiptEmail; return this; } @@ -321,7 +320,7 @@ public Builder setSavePaymentMethod(Boolean savePaymentMethod) { *

If `setup_future_usage` is already set and you are performing a request using a * publishable key, you may only update the value from `on_session` to `off_session`. */ - public Builder setSetupFutureUsage(SetupFutureUsage setupFutureUsage) { + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } @@ -348,7 +347,7 @@ public Builder setSetupFutureUsage(SetupFutureUsage setupFutureUsage) { *

If `setup_future_usage` is already set and you are performing a request using a * publishable key, you may only update the value from `on_session` to `off_session`. */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + public Builder setSetupFutureUsage(SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } @@ -396,7 +395,7 @@ private PaymentMethodOptions(Card card, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.PaymentIntentConfirmParams.PaymentMethodOptions.Builder(); + return new Builder(); } public static class Builder { @@ -482,7 +481,7 @@ private Card( } public static Builder builder() { - return new com.stripe.param.PaymentIntentConfirmParams.PaymentMethodOptions.Card.Builder(); + return new Builder(); } public static class Builder { @@ -617,7 +616,7 @@ private Shipping( } public static Builder builder() { - return new com.stripe.param.PaymentIntentConfirmParams.Shipping.Builder(); + return new Builder(); } public static class Builder { @@ -750,7 +749,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.PaymentIntentConfirmParams.Shipping.Address.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 4ee829a8bb7..d6bcfe9a326 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -296,7 +294,7 @@ private PaymentIntentCreateParams( } public static Builder builder() { - return new com.stripe.param.PaymentIntentCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -566,7 +564,7 @@ public Builder putAllMetadata(Map map) { * be used with * [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - public Builder setOffSession(OffSession offSession) { + public Builder setOffSession(Boolean offSession) { this.offSession = offSession; return this; } @@ -579,7 +577,7 @@ public Builder setOffSession(OffSession offSession) { * be used with * [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - public Builder setOffSession(Boolean offSession) { + public Builder setOffSession(OffSession offSession) { this.offSession = offSession; return this; } @@ -768,7 +766,7 @@ private PaymentMethodOptions(Card card, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.PaymentIntentCreateParams.PaymentMethodOptions.Builder(); + return new Builder(); } public static class Builder { @@ -854,7 +852,7 @@ private Card( } public static Builder builder() { - return new com.stripe.param.PaymentIntentCreateParams.PaymentMethodOptions.Card.Builder(); + return new Builder(); } public static class Builder { @@ -989,7 +987,7 @@ private Shipping( } public static Builder builder() { - return new com.stripe.param.PaymentIntentCreateParams.Shipping.Builder(); + return new Builder(); } public static class Builder { @@ -1122,7 +1120,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.PaymentIntentCreateParams.Shipping.Address.Builder(); + return new Builder(); } public static class Builder { @@ -1250,7 +1248,7 @@ private TransferData(Long amount, String destination, Map extraP } public static Builder builder() { - return new com.stripe.param.PaymentIntentCreateParams.TransferData.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentIntentListParams.java b/src/main/java/com/stripe/param/PaymentIntentListParams.java index 3c8b4b1117d..39606df8588 100644 --- a/src/main/java/com/stripe/param/PaymentIntentListParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -77,7 +75,7 @@ private PaymentIntentListParams( } public static Builder builder() { - return new com.stripe.param.PaymentIntentListParams.Builder(); + return new Builder(); } public static class Builder { @@ -250,7 +248,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.PaymentIntentListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java b/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java index ccefb16da6a..d54f77c982d 100644 --- a/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -38,7 +36,7 @@ private PaymentIntentRetrieveParams( } public static Builder builder() { - return new com.stripe.param.PaymentIntentRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index f99008503a2..391470009ee 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -1,9 +1,8 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiRequestParams.EnumParam; import com.stripe.param.common.EmptyParam; import java.util.ArrayList; import java.util.HashMap; @@ -115,7 +114,7 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { * key, you may only update the value from `on_session` to `off_session`. */ @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + EnumParam setupFutureUsage; /** Shipping information for this PaymentIntent. */ @SerializedName("shipping") @@ -174,7 +173,7 @@ private PaymentIntentUpdateParams( List paymentMethodTypes, Object receiptEmail, Boolean savePaymentMethod, - ApiRequestParams.EnumParam setupFutureUsage, + EnumParam setupFutureUsage, Object shipping, String source, String statementDescriptor, @@ -203,7 +202,7 @@ private PaymentIntentUpdateParams( } public static Builder builder() { - return new com.stripe.param.PaymentIntentUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -231,7 +230,7 @@ public static class Builder { private Boolean savePaymentMethod; - private ApiRequestParams.EnumParam setupFutureUsage; + private EnumParam setupFutureUsage; private Object shipping; @@ -281,7 +280,7 @@ public Builder setAmount(Long amount) { * accounts](https://stripe.com/docs/payments/payment-intents/use-cases#connected-accounts) for * details. */ - public Builder setApplicationFeeAmount(EmptyParam applicationFeeAmount) { + public Builder setApplicationFeeAmount(Long applicationFeeAmount) { this.applicationFeeAmount = applicationFeeAmount; return this; } @@ -292,7 +291,7 @@ public Builder setApplicationFeeAmount(EmptyParam applicationFeeAmount) { * accounts](https://stripe.com/docs/payments/payment-intents/use-cases#connected-accounts) for * details. */ - public Builder setApplicationFeeAmount(Long applicationFeeAmount) { + public Builder setApplicationFeeAmount(EmptyParam applicationFeeAmount) { this.applicationFeeAmount = applicationFeeAmount; return this; } @@ -438,13 +437,13 @@ public Builder addAllPaymentMethodType(List elements) { } /** Email address that the receipt for the resulting payment will be sent to. */ - public Builder setReceiptEmail(EmptyParam receiptEmail) { + public Builder setReceiptEmail(String receiptEmail) { this.receiptEmail = receiptEmail; return this; } /** Email address that the receipt for the resulting payment will be sent to. */ - public Builder setReceiptEmail(String receiptEmail) { + public Builder setReceiptEmail(EmptyParam receiptEmail) { this.receiptEmail = receiptEmail; return this; } @@ -484,7 +483,7 @@ public Builder setSavePaymentMethod(Boolean savePaymentMethod) { *

If `setup_future_usage` is already set and you are performing a request using a * publishable key, you may only update the value from `on_session` to `off_session`. */ - public Builder setSetupFutureUsage(SetupFutureUsage setupFutureUsage) { + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } @@ -511,7 +510,7 @@ public Builder setSetupFutureUsage(SetupFutureUsage setupFutureUsage) { *

If `setup_future_usage` is already set and you are performing a request using a * publishable key, you may only update the value from `on_session` to `off_session`. */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + public Builder setSetupFutureUsage(SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } @@ -629,7 +628,7 @@ private Shipping( } public static Builder builder() { - return new com.stripe.param.PaymentIntentUpdateParams.Shipping.Builder(); + return new Builder(); } public static class Builder { @@ -762,7 +761,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.PaymentIntentUpdateParams.Shipping.Address.Builder(); + return new Builder(); } public static class Builder { @@ -873,7 +872,7 @@ private TransferData(Long amount, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.PaymentIntentUpdateParams.TransferData.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentMethodAttachParams.java b/src/main/java/com/stripe/param/PaymentMethodAttachParams.java index a57c6426108..985a22f7295 100644 --- a/src/main/java/com/stripe/param/PaymentMethodAttachParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodAttachParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -35,7 +33,7 @@ private PaymentMethodAttachParams( } public static Builder builder() { - return new com.stripe.param.PaymentMethodAttachParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index 265e1595deb..403fa6e0c30 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -87,7 +85,7 @@ private PaymentMethodCreateParams( } public static Builder builder() { - return new com.stripe.param.PaymentMethodCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -294,7 +292,7 @@ private BillingDetails( } public static Builder builder() { - return new com.stripe.param.PaymentMethodCreateParams.BillingDetails.Builder(); + return new Builder(); } public static class Builder { @@ -412,7 +410,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.PaymentMethodCreateParams.BillingDetails.Address.Builder(); + return new Builder(); } public static class Builder { @@ -539,7 +537,7 @@ private CardDetails( } public static Builder builder() { - return new com.stripe.param.PaymentMethodCreateParams.CardDetails.Builder(); + return new Builder(); } public static class Builder { @@ -630,7 +628,7 @@ private Token(Map extraParams, String token) { } public static Builder builder() { - return new com.stripe.param.PaymentMethodCreateParams.Token.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentMethodDetachParams.java b/src/main/java/com/stripe/param/PaymentMethodDetachParams.java index 65b10534134..a9c88264212 100644 --- a/src/main/java/com/stripe/param/PaymentMethodDetachParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodDetachParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private PaymentMethodDetachParams(List expand, Map extra } public static Builder builder() { - return new com.stripe.param.PaymentMethodDetachParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java index 33df3416efc..a2697162afb 100644 --- a/src/main/java/com/stripe/param/PaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -75,7 +73,7 @@ private PaymentMethodListParams( } public static Builder builder() { - return new com.stripe.param.PaymentMethodListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentMethodRetrieveParams.java b/src/main/java/com/stripe/param/PaymentMethodRetrieveParams.java index 1f6da0041f4..3ed934b1037 100644 --- a/src/main/java/com/stripe/param/PaymentMethodRetrieveParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private PaymentMethodRetrieveParams(List expand, Map ext } public static Builder builder() { - return new com.stripe.param.PaymentMethodRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java index 4fd5d71b98d..e41adc7bead 100644 --- a/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -54,7 +52,7 @@ private PaymentMethodUpdateParams( } public static Builder builder() { - return new com.stripe.param.PaymentMethodUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -203,7 +201,7 @@ private BillingDetails( } public static Builder builder() { - return new com.stripe.param.PaymentMethodUpdateParams.BillingDetails.Builder(); + return new Builder(); } public static class Builder { @@ -321,7 +319,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.PaymentMethodUpdateParams.BillingDetails.Address.Builder(); + return new Builder(); } public static class Builder { @@ -437,7 +435,7 @@ private Card(Long expMonth, Long expYear, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.PaymentMethodUpdateParams.Card.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentSourceCollectionCreateParams.java b/src/main/java/com/stripe/param/PaymentSourceCollectionCreateParams.java index 5806946b2e5..be37731c916 100644 --- a/src/main/java/com/stripe/param/PaymentSourceCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentSourceCollectionCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -46,7 +44,7 @@ private PaymentSourceCollectionCreateParams( } public static Builder builder() { - return new com.stripe.param.PaymentSourceCollectionCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentSourceCollectionListParams.java b/src/main/java/com/stripe/param/PaymentSourceCollectionListParams.java index 196d7f54cdc..29eaf39e9bb 100644 --- a/src/main/java/com/stripe/param/PaymentSourceCollectionListParams.java +++ b/src/main/java/com/stripe/param/PaymentSourceCollectionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -68,7 +66,7 @@ private PaymentSourceCollectionListParams( } public static Builder builder() { - return new com.stripe.param.PaymentSourceCollectionListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PaymentSourceCollectionRetrieveParams.java b/src/main/java/com/stripe/param/PaymentSourceCollectionRetrieveParams.java index dfe29f8a421..c78fab2f142 100644 --- a/src/main/java/com/stripe/param/PaymentSourceCollectionRetrieveParams.java +++ b/src/main/java/com/stripe/param/PaymentSourceCollectionRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -30,7 +28,7 @@ private PaymentSourceCollectionRetrieveParams( } public static Builder builder() { - return new com.stripe.param.PaymentSourceCollectionRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PayoutCancelParams.java b/src/main/java/com/stripe/param/PayoutCancelParams.java index 1ac46d5b753..ad7d1bcf4a2 100644 --- a/src/main/java/com/stripe/param/PayoutCancelParams.java +++ b/src/main/java/com/stripe/param/PayoutCancelParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private PayoutCancelParams(List expand, Map extraParams) } public static Builder builder() { - return new com.stripe.param.PayoutCancelParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PayoutCreateParams.java b/src/main/java/com/stripe/param/PayoutCreateParams.java index 7d2d9d950c8..8c167bbfe2e 100644 --- a/src/main/java/com/stripe/param/PayoutCreateParams.java +++ b/src/main/java/com/stripe/param/PayoutCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -101,7 +99,7 @@ private PayoutCreateParams( } public static Builder builder() { - return new com.stripe.param.PayoutCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PayoutListParams.java b/src/main/java/com/stripe/param/PayoutListParams.java index da6bd61dc90..5c9b8f6b10c 100644 --- a/src/main/java/com/stripe/param/PayoutListParams.java +++ b/src/main/java/com/stripe/param/PayoutListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -84,7 +82,7 @@ private PayoutListParams( } public static Builder builder() { - return new com.stripe.param.PayoutListParams.Builder(); + return new Builder(); } public static class Builder { @@ -273,7 +271,7 @@ private ArrivalDate(Map extraParams, Long gt, Long gte, Long lt, } public static Builder builder() { - return new com.stripe.param.PayoutListParams.ArrivalDate.Builder(); + return new Builder(); } public static class Builder { @@ -379,7 +377,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.PayoutListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PayoutRetrieveParams.java b/src/main/java/com/stripe/param/PayoutRetrieveParams.java index 9202a5a2c27..e562f7cb244 100644 --- a/src/main/java/com/stripe/param/PayoutRetrieveParams.java +++ b/src/main/java/com/stripe/param/PayoutRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private PayoutRetrieveParams(List expand, Map extraParam } public static Builder builder() { - return new com.stripe.param.PayoutRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PayoutUpdateParams.java b/src/main/java/com/stripe/param/PayoutUpdateParams.java index 599d943bbc4..6bb54794041 100644 --- a/src/main/java/com/stripe/param/PayoutUpdateParams.java +++ b/src/main/java/com/stripe/param/PayoutUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -38,7 +36,7 @@ private PayoutUpdateParams( } public static Builder builder() { - return new com.stripe.param.PayoutUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java index 0f5c8422f8b..d23fb25a6e1 100644 --- a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -165,7 +163,7 @@ private PersonCollectionCreateParams( } public static Builder builder() { - return new com.stripe.param.PersonCollectionCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -502,7 +500,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.PersonCollectionCreateParams.Address.Builder(); + return new Builder(); } public static class Builder { @@ -660,7 +658,7 @@ private AddressKana( } public static Builder builder() { - return new com.stripe.param.PersonCollectionCreateParams.AddressKana.Builder(); + return new Builder(); } public static class Builder { @@ -828,7 +826,7 @@ private AddressKanji( } public static Builder builder() { - return new com.stripe.param.PersonCollectionCreateParams.AddressKanji.Builder(); + return new Builder(); } public static class Builder { @@ -965,7 +963,7 @@ private Dob(Long day, Map extraParams, Long month, Long year) { } public static Builder builder() { - return new com.stripe.param.PersonCollectionCreateParams.Dob.Builder(); + return new Builder(); } public static class Builder { @@ -1090,7 +1088,7 @@ private Relationship( } public static Builder builder() { - return new com.stripe.param.PersonCollectionCreateParams.Relationship.Builder(); + return new Builder(); } public static class Builder { @@ -1182,13 +1180,13 @@ public Builder setOwner(Boolean owner) { } /** The percent owned by the person of the account's legal entity. */ - public Builder setPercentOwnership(EmptyParam percentOwnership) { + public Builder setPercentOwnership(BigDecimal percentOwnership) { this.percentOwnership = percentOwnership; return this; } /** The percent owned by the person of the account's legal entity. */ - public Builder setPercentOwnership(BigDecimal percentOwnership) { + public Builder setPercentOwnership(EmptyParam percentOwnership) { this.percentOwnership = percentOwnership; return this; } @@ -1221,7 +1219,7 @@ private Verification(Document document, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.PersonCollectionCreateParams.Verification.Builder(); + return new Builder(); } public static class Builder { @@ -1299,7 +1297,7 @@ private Document(String back, Map extraParams, String front) { } public static Builder builder() { - return new com.stripe.param.PersonCollectionCreateParams.Verification.Document.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PersonCollectionListParams.java b/src/main/java/com/stripe/param/PersonCollectionListParams.java index 41447d3b5f1..3b2df56440d 100644 --- a/src/main/java/com/stripe/param/PersonCollectionListParams.java +++ b/src/main/java/com/stripe/param/PersonCollectionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -71,7 +69,7 @@ private PersonCollectionListParams( } public static Builder builder() { - return new com.stripe.param.PersonCollectionListParams.Builder(); + return new Builder(); } public static class Builder { @@ -243,7 +241,7 @@ private Relationship( } public static Builder builder() { - return new com.stripe.param.PersonCollectionListParams.Relationship.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PersonCollectionRetrieveParams.java b/src/main/java/com/stripe/param/PersonCollectionRetrieveParams.java index ccb82b0f9ce..a59a6acc51e 100644 --- a/src/main/java/com/stripe/param/PersonCollectionRetrieveParams.java +++ b/src/main/java/com/stripe/param/PersonCollectionRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private PersonCollectionRetrieveParams(List expand, Map } public static Builder builder() { - return new com.stripe.param.PersonCollectionRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PersonUpdateParams.java b/src/main/java/com/stripe/param/PersonUpdateParams.java index 99a25d9f62c..c2fe3e7f5b6 100644 --- a/src/main/java/com/stripe/param/PersonUpdateParams.java +++ b/src/main/java/com/stripe/param/PersonUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -165,7 +163,7 @@ private PersonUpdateParams( } public static Builder builder() { - return new com.stripe.param.PersonUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -502,7 +500,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.PersonUpdateParams.Address.Builder(); + return new Builder(); } public static class Builder { @@ -660,7 +658,7 @@ private AddressKana( } public static Builder builder() { - return new com.stripe.param.PersonUpdateParams.AddressKana.Builder(); + return new Builder(); } public static class Builder { @@ -827,7 +825,7 @@ private AddressKanji( } public static Builder builder() { - return new com.stripe.param.PersonUpdateParams.AddressKanji.Builder(); + return new Builder(); } public static class Builder { @@ -963,7 +961,7 @@ private Dob(Long day, Map extraParams, Long month, Long year) { } public static Builder builder() { - return new com.stripe.param.PersonUpdateParams.Dob.Builder(); + return new Builder(); } public static class Builder { @@ -1088,7 +1086,7 @@ private Relationship( } public static Builder builder() { - return new com.stripe.param.PersonUpdateParams.Relationship.Builder(); + return new Builder(); } public static class Builder { @@ -1179,13 +1177,13 @@ public Builder setOwner(Boolean owner) { } /** The percent owned by the person of the account's legal entity. */ - public Builder setPercentOwnership(EmptyParam percentOwnership) { + public Builder setPercentOwnership(BigDecimal percentOwnership) { this.percentOwnership = percentOwnership; return this; } /** The percent owned by the person of the account's legal entity. */ - public Builder setPercentOwnership(BigDecimal percentOwnership) { + public Builder setPercentOwnership(EmptyParam percentOwnership) { this.percentOwnership = percentOwnership; return this; } @@ -1218,7 +1216,7 @@ private Verification(Document document, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.PersonUpdateParams.Verification.Builder(); + return new Builder(); } public static class Builder { @@ -1295,7 +1293,7 @@ private Document(String back, Map extraParams, String front) { } public static Builder builder() { - return new com.stripe.param.PersonUpdateParams.Verification.Document.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PlanCreateParams.java b/src/main/java/com/stripe/param/PlanCreateParams.java index 0409602ca7f..8aa7de6e4fd 100644 --- a/src/main/java/com/stripe/param/PlanCreateParams.java +++ b/src/main/java/com/stripe/param/PlanCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -184,7 +182,7 @@ private PlanCreateParams( } public static Builder builder() { - return new com.stripe.param.PlanCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -565,7 +563,7 @@ private Product( } public static Builder builder() { - return new com.stripe.param.PlanCreateParams.Product.Builder(); + return new Builder(); } public static class Builder { @@ -751,7 +749,7 @@ private Tier( } public static Builder builder() { - return new com.stripe.param.PlanCreateParams.Tier.Builder(); + return new Builder(); } public static class Builder { @@ -893,7 +891,7 @@ private TransformUsage(Long divideBy, Map extraParams, Round rou } public static Builder builder() { - return new com.stripe.param.PlanCreateParams.TransformUsage.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PlanListParams.java b/src/main/java/com/stripe/param/PlanListParams.java index a13b164ffc1..acf777d8e13 100644 --- a/src/main/java/com/stripe/param/PlanListParams.java +++ b/src/main/java/com/stripe/param/PlanListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -86,7 +84,7 @@ private PlanListParams( } public static Builder builder() { - return new com.stripe.param.PlanListParams.Builder(); + return new Builder(); } public static class Builder { @@ -271,7 +269,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.PlanListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PlanRetrieveParams.java b/src/main/java/com/stripe/param/PlanRetrieveParams.java index b8743d9174e..76d31c681be 100644 --- a/src/main/java/com/stripe/param/PlanRetrieveParams.java +++ b/src/main/java/com/stripe/param/PlanRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private PlanRetrieveParams(List expand, Map extraParams) } public static Builder builder() { - return new com.stripe.param.PlanRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/PlanUpdateParams.java b/src/main/java/com/stripe/param/PlanUpdateParams.java index cacd9277223..2b5ac67e53d 100644 --- a/src/main/java/com/stripe/param/PlanUpdateParams.java +++ b/src/main/java/com/stripe/param/PlanUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -70,7 +68,7 @@ private PlanUpdateParams( } public static Builder builder() { - return new com.stripe.param.PlanUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ProductCreateParams.java b/src/main/java/com/stripe/param/ProductCreateParams.java index dfbbf1e9d54..c9a1a3538e3 100644 --- a/src/main/java/com/stripe/param/ProductCreateParams.java +++ b/src/main/java/com/stripe/param/ProductCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -164,7 +162,7 @@ private ProductCreateParams( } public static Builder builder() { - return new com.stripe.param.ProductCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -519,7 +517,7 @@ private PackageDimensions( } public static Builder builder() { - return new com.stripe.param.ProductCreateParams.PackageDimensions.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ProductListParams.java b/src/main/java/com/stripe/param/ProductListParams.java index 5179d389824..a785fdb7de9 100644 --- a/src/main/java/com/stripe/param/ProductListParams.java +++ b/src/main/java/com/stripe/param/ProductListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -102,7 +100,7 @@ private ProductListParams( } public static Builder builder() { - return new com.stripe.param.ProductListParams.Builder(); + return new Builder(); } public static class Builder { @@ -328,7 +326,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.ProductListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ProductRetrieveParams.java b/src/main/java/com/stripe/param/ProductRetrieveParams.java index 8e50b6510d6..ed8a31394d9 100644 --- a/src/main/java/com/stripe/param/ProductRetrieveParams.java +++ b/src/main/java/com/stripe/param/ProductRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ProductRetrieveParams(List expand, Map extraPara } public static Builder builder() { - return new com.stripe.param.ProductRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ProductUpdateParams.java b/src/main/java/com/stripe/param/ProductUpdateParams.java index 98fc05a4978..60a4cb41d46 100644 --- a/src/main/java/com/stripe/param/ProductUpdateParams.java +++ b/src/main/java/com/stripe/param/ProductUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -137,7 +135,7 @@ private ProductUpdateParams( } public static Builder builder() { - return new com.stripe.param.ProductUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -203,7 +201,7 @@ public Builder setActive(Boolean active) { * replace the existing attributes list on this product. Any attributes not present after the * update will be deleted from the SKUs for this product. */ - public Builder setAttributes(EmptyParam attributes) { + public Builder setAttributes(List attributes) { this.attributes = attributes; return this; } @@ -214,7 +212,7 @@ public Builder setAttributes(EmptyParam attributes) { * replace the existing attributes list on this product. Any attributes not present after the * update will be deleted from the SKUs for this product. */ - public Builder setAttributes(List attributes) { + public Builder setAttributes(EmptyParam attributes) { this.attributes = attributes; return this; } @@ -312,7 +310,7 @@ public Builder putAllExtraParam(Map map) { /** * A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - public Builder setImages(EmptyParam images) { + public Builder setImages(List images) { this.images = images; return this; } @@ -320,7 +318,7 @@ public Builder setImages(EmptyParam images) { /** * A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - public Builder setImages(List images) { + public Builder setImages(EmptyParam images) { this.images = images; return this; } @@ -453,7 +451,7 @@ private PackageDimensions( } public static Builder builder() { - return new com.stripe.param.ProductUpdateParams.PackageDimensions.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/RecipientCreateParams.java b/src/main/java/com/stripe/param/RecipientCreateParams.java index 3a97e4c09b9..f33fae01c29 100644 --- a/src/main/java/com/stripe/param/RecipientCreateParams.java +++ b/src/main/java/com/stripe/param/RecipientCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -106,7 +104,7 @@ private RecipientCreateParams( } public static Builder builder() { - return new com.stripe.param.RecipientCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/RecipientListParams.java b/src/main/java/com/stripe/param/RecipientListParams.java index 03068167c80..028221b489c 100644 --- a/src/main/java/com/stripe/param/RecipientListParams.java +++ b/src/main/java/com/stripe/param/RecipientListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -79,7 +77,7 @@ private RecipientListParams( } public static Builder builder() { - return new com.stripe.param.RecipientListParams.Builder(); + return new Builder(); } public static class Builder { @@ -252,7 +250,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.RecipientListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/RecipientRetrieveParams.java b/src/main/java/com/stripe/param/RecipientRetrieveParams.java index 92b20c70871..03cbb8ff140 100644 --- a/src/main/java/com/stripe/param/RecipientRetrieveParams.java +++ b/src/main/java/com/stripe/param/RecipientRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private RecipientRetrieveParams(List expand, Map extraPa } public static Builder builder() { - return new com.stripe.param.RecipientRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/RecipientUpdateParams.java b/src/main/java/com/stripe/param/RecipientUpdateParams.java index 6b54e3dc0bc..7e204b89722 100644 --- a/src/main/java/com/stripe/param/RecipientUpdateParams.java +++ b/src/main/java/com/stripe/param/RecipientUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -108,7 +106,7 @@ private RecipientUpdateParams( } public static Builder builder() { - return new com.stripe.param.RecipientUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/RefundCollectionListParams.java b/src/main/java/com/stripe/param/RefundCollectionListParams.java index b137abcf339..4af9b8fe375 100644 --- a/src/main/java/com/stripe/param/RefundCollectionListParams.java +++ b/src/main/java/com/stripe/param/RefundCollectionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private RefundCollectionListParams( } public static Builder builder() { - return new com.stripe.param.RefundCollectionListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/RefundCollectionRetrieveParams.java b/src/main/java/com/stripe/param/RefundCollectionRetrieveParams.java index c9cbe118439..876545d5909 100644 --- a/src/main/java/com/stripe/param/RefundCollectionRetrieveParams.java +++ b/src/main/java/com/stripe/param/RefundCollectionRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private RefundCollectionRetrieveParams(List expand, Map } public static Builder builder() { - return new com.stripe.param.RefundCollectionRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/RefundCreateParams.java b/src/main/java/com/stripe/param/RefundCreateParams.java index 9d839ac1b5c..d71c68615fa 100644 --- a/src/main/java/com/stripe/param/RefundCreateParams.java +++ b/src/main/java/com/stripe/param/RefundCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private RefundCreateParams( } public static Builder builder() { - return new com.stripe.param.RefundCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/RefundListParams.java b/src/main/java/com/stripe/param/RefundListParams.java index 96799800964..0f379b50835 100644 --- a/src/main/java/com/stripe/param/RefundListParams.java +++ b/src/main/java/com/stripe/param/RefundListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -73,7 +71,7 @@ private RefundListParams( } public static Builder builder() { - return new com.stripe.param.RefundListParams.Builder(); + return new Builder(); } public static class Builder { @@ -238,7 +236,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.RefundListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/RefundRetrieveParams.java b/src/main/java/com/stripe/param/RefundRetrieveParams.java index 46eeea8288c..92842232af4 100644 --- a/src/main/java/com/stripe/param/RefundRetrieveParams.java +++ b/src/main/java/com/stripe/param/RefundRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private RefundRetrieveParams(List expand, Map extraParam } public static Builder builder() { - return new com.stripe.param.RefundRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/RefundUpdateParams.java b/src/main/java/com/stripe/param/RefundUpdateParams.java index 4fe60725978..d068aa7946a 100644 --- a/src/main/java/com/stripe/param/RefundUpdateParams.java +++ b/src/main/java/com/stripe/param/RefundUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -39,7 +37,7 @@ private RefundUpdateParams( } public static Builder builder() { - return new com.stripe.param.RefundUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ReviewApproveParams.java b/src/main/java/com/stripe/param/ReviewApproveParams.java index 91aa606b77d..fd89ebabf37 100644 --- a/src/main/java/com/stripe/param/ReviewApproveParams.java +++ b/src/main/java/com/stripe/param/ReviewApproveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ReviewApproveParams(List expand, Map extraParams } public static Builder builder() { - return new com.stripe.param.ReviewApproveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ReviewListParams.java b/src/main/java/com/stripe/param/ReviewListParams.java index 7067608fc0a..70fb451ea88 100644 --- a/src/main/java/com/stripe/param/ReviewListParams.java +++ b/src/main/java/com/stripe/param/ReviewListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -67,7 +65,7 @@ private ReviewListParams( } public static Builder builder() { - return new com.stripe.param.ReviewListParams.Builder(); + return new Builder(); } public static class Builder { @@ -223,7 +221,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.ReviewListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ReviewRetrieveParams.java b/src/main/java/com/stripe/param/ReviewRetrieveParams.java index 49de5a8b474..29e2f1e7e50 100644 --- a/src/main/java/com/stripe/param/ReviewRetrieveParams.java +++ b/src/main/java/com/stripe/param/ReviewRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ReviewRetrieveParams(List expand, Map extraParam } public static Builder builder() { - return new com.stripe.param.ReviewRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SetupIntentCancelParams.java b/src/main/java/com/stripe/param/SetupIntentCancelParams.java index 31775998e16..5d2b14be340 100644 --- a/src/main/java/com/stripe/param/SetupIntentCancelParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCancelParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -39,7 +37,7 @@ private SetupIntentCancelParams( } public static Builder builder() { - return new com.stripe.param.SetupIntentCancelParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index a7231921466..73de810d6fe 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -58,7 +56,7 @@ private SetupIntentConfirmParams( } public static Builder builder() { - return new com.stripe.param.SetupIntentConfirmParams.Builder(); + return new Builder(); } public static class Builder { @@ -181,7 +179,7 @@ private PaymentMethodOptions(Card card, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.SetupIntentConfirmParams.PaymentMethodOptions.Builder(); + return new Builder(); } public static class Builder { @@ -267,7 +265,7 @@ private Card( } public static Builder builder() { - return new com.stripe.param.SetupIntentConfirmParams.PaymentMethodOptions.Card.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index c823c3adfb0..8d279ef8c31 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -121,7 +119,7 @@ private SetupIntentCreateParams( } public static Builder builder() { - return new com.stripe.param.SetupIntentCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -375,7 +373,7 @@ private PaymentMethodOptions(Card card, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.SetupIntentCreateParams.PaymentMethodOptions.Builder(); + return new Builder(); } public static class Builder { @@ -461,7 +459,7 @@ private Card( } public static Builder builder() { - return new com.stripe.param.SetupIntentCreateParams.PaymentMethodOptions.Card.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SetupIntentListParams.java b/src/main/java/com/stripe/param/SetupIntentListParams.java index 6235b4ed7ce..7c38e2b78ad 100644 --- a/src/main/java/com/stripe/param/SetupIntentListParams.java +++ b/src/main/java/com/stripe/param/SetupIntentListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -83,7 +81,7 @@ private SetupIntentListParams( } public static Builder builder() { - return new com.stripe.param.SetupIntentListParams.Builder(); + return new Builder(); } public static class Builder { @@ -265,7 +263,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.SetupIntentListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SetupIntentRetrieveParams.java b/src/main/java/com/stripe/param/SetupIntentRetrieveParams.java index cdd708dcea2..51534e21d22 100644 --- a/src/main/java/com/stripe/param/SetupIntentRetrieveParams.java +++ b/src/main/java/com/stripe/param/SetupIntentRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -38,7 +36,7 @@ private SetupIntentRetrieveParams( } public static Builder builder() { - return new com.stripe.param.SetupIntentRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index ecb1f1bc901..660be072ec7 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -75,7 +73,7 @@ private SetupIntentUpdateParams( } public static Builder builder() { - return new com.stripe.param.SetupIntentUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SkuCreateParams.java b/src/main/java/com/stripe/param/SkuCreateParams.java index e82c0efc1fa..b3e9289e62e 100644 --- a/src/main/java/com/stripe/param/SkuCreateParams.java +++ b/src/main/java/com/stripe/param/SkuCreateParams.java @@ -1,9 +1,8 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiRequestParams.EnumParam; import com.stripe.param.common.EmptyParam; import java.math.BigDecimal; import java.util.ArrayList; @@ -110,7 +109,7 @@ private SkuCreateParams( } public static Builder builder() { - return new com.stripe.param.SkuCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -340,13 +339,9 @@ public static class Inventory { * `out_of_stock`. Will be present if and only if `type` is `bucket`. */ @SerializedName("value") - ApiRequestParams.EnumParam value; + EnumParam value; - private Inventory( - Map extraParams, - Long quantity, - Type type, - ApiRequestParams.EnumParam value) { + private Inventory(Map extraParams, Long quantity, Type type, EnumParam value) { this.extraParams = extraParams; this.quantity = quantity; this.type = type; @@ -354,7 +349,7 @@ private Inventory( } public static Builder builder() { - return new com.stripe.param.SkuCreateParams.Inventory.Builder(); + return new Builder(); } public static class Builder { @@ -364,7 +359,7 @@ public static class Builder { private Type type; - private ApiRequestParams.EnumParam value; + private EnumParam value; /** Finalize and obtain parameter instance from this builder. */ public Inventory build() { @@ -415,7 +410,7 @@ public Builder setType(Type type) { * An indicator of the inventory available. Possible values are `in_stock`, `limited`, and * `out_of_stock`. Will be present if and only if `type` is `bucket`. */ - public Builder setValue(Value value) { + public Builder setValue(EmptyParam value) { this.value = value; return this; } @@ -424,7 +419,7 @@ public Builder setValue(Value value) { * An indicator of the inventory available. Possible values are `in_stock`, `limited`, and * `out_of_stock`. Will be present if and only if `type` is `bucket`. */ - public Builder setValue(EmptyParam value) { + public Builder setValue(Value value) { this.value = value; return this; } @@ -507,7 +502,7 @@ private PackageDimensions( } public static Builder builder() { - return new com.stripe.param.SkuCreateParams.PackageDimensions.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SkuListParams.java b/src/main/java/com/stripe/param/SkuListParams.java index 8eee8011d0f..af6202fddf7 100644 --- a/src/main/java/com/stripe/param/SkuListParams.java +++ b/src/main/java/com/stripe/param/SkuListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -103,7 +101,7 @@ private SkuListParams( } public static Builder builder() { - return new com.stripe.param.SkuListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SkuRetrieveParams.java b/src/main/java/com/stripe/param/SkuRetrieveParams.java index a7ded91a13a..41fadefb6b6 100644 --- a/src/main/java/com/stripe/param/SkuRetrieveParams.java +++ b/src/main/java/com/stripe/param/SkuRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private SkuRetrieveParams(List expand, Map extraParams) } public static Builder builder() { - return new com.stripe.param.SkuRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SkuUpdateParams.java b/src/main/java/com/stripe/param/SkuUpdateParams.java index f6da34c8df0..7ab556047f5 100644 --- a/src/main/java/com/stripe/param/SkuUpdateParams.java +++ b/src/main/java/com/stripe/param/SkuUpdateParams.java @@ -1,9 +1,8 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiRequestParams.EnumParam; import com.stripe.param.common.EmptyParam; import java.math.BigDecimal; import java.util.ArrayList; @@ -105,7 +104,7 @@ private SkuUpdateParams( } public static Builder builder() { - return new com.stripe.param.SkuUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -332,13 +331,9 @@ public static class Inventory { * `out_of_stock`. Will be present if and only if `type` is `bucket`. */ @SerializedName("value") - ApiRequestParams.EnumParam value; + EnumParam value; - private Inventory( - Map extraParams, - Long quantity, - Type type, - ApiRequestParams.EnumParam value) { + private Inventory(Map extraParams, Long quantity, Type type, EnumParam value) { this.extraParams = extraParams; this.quantity = quantity; this.type = type; @@ -346,7 +341,7 @@ private Inventory( } public static Builder builder() { - return new com.stripe.param.SkuUpdateParams.Inventory.Builder(); + return new Builder(); } public static class Builder { @@ -356,7 +351,7 @@ public static class Builder { private Type type; - private ApiRequestParams.EnumParam value; + private EnumParam value; /** Finalize and obtain parameter instance from this builder. */ public Inventory build() { @@ -407,7 +402,7 @@ public Builder setType(Type type) { * An indicator of the inventory available. Possible values are `in_stock`, `limited`, and * `out_of_stock`. Will be present if and only if `type` is `bucket`. */ - public Builder setValue(Value value) { + public Builder setValue(EmptyParam value) { this.value = value; return this; } @@ -416,7 +411,7 @@ public Builder setValue(Value value) { * An indicator of the inventory available. Possible values are `in_stock`, `limited`, and * `out_of_stock`. Will be present if and only if `type` is `bucket`. */ - public Builder setValue(EmptyParam value) { + public Builder setValue(Value value) { this.value = value; return this; } @@ -499,7 +494,7 @@ private PackageDimensions( } public static Builder builder() { - return new com.stripe.param.SkuUpdateParams.PackageDimensions.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SourceCreateParams.java b/src/main/java/com/stripe/param/SourceCreateParams.java index e10658d3f47..2cb04f80ab4 100644 --- a/src/main/java/com/stripe/param/SourceCreateParams.java +++ b/src/main/java/com/stripe/param/SourceCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -164,7 +162,7 @@ private SourceCreateParams( } public static Builder builder() { - return new com.stripe.param.SourceCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -483,7 +481,7 @@ private Mandate( } public static Builder builder() { - return new com.stripe.param.SourceCreateParams.Mandate.Builder(); + return new Builder(); } public static class Builder { @@ -520,13 +518,13 @@ public Builder setAcceptance(Acceptance acceptance) { } /** The amount specified by the mandate. (Leave null for a mandate covering all amounts) */ - public Builder setAmount(EmptyParam amount) { + public Builder setAmount(Long amount) { this.amount = amount; return this; } /** The amount specified by the mandate. (Leave null for a mandate covering all amounts) */ - public Builder setAmount(Long amount) { + public Builder setAmount(EmptyParam amount) { this.amount = amount; return this; } @@ -658,7 +656,7 @@ private Acceptance( } public static Builder builder() { - return new com.stripe.param.SourceCreateParams.Mandate.Acceptance.Builder(); + return new Builder(); } public static class Builder { @@ -801,7 +799,7 @@ private Offline(String contactEmail, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.SourceCreateParams.Mandate.Acceptance.Offline.Builder(); + return new Builder(); } public static class Builder { @@ -887,7 +885,7 @@ private Online(Long date, Map extraParams, String ip, String use } public static Builder builder() { - return new com.stripe.param.SourceCreateParams.Mandate.Acceptance.Online.Builder(); + return new Builder(); } public static class Builder { @@ -1071,7 +1069,7 @@ private Owner( } public static Builder builder() { - return new com.stripe.param.SourceCreateParams.Owner.Builder(); + return new Builder(); } public static class Builder { @@ -1187,7 +1185,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.SourceCreateParams.Owner.Address.Builder(); + return new Builder(); } public static class Builder { @@ -1304,7 +1302,7 @@ private Receiver( } public static Builder builder() { - return new com.stripe.param.SourceCreateParams.Receiver.Builder(); + return new Builder(); } public static class Builder { @@ -1397,7 +1395,7 @@ private Redirect(Map extraParams, String returnUrl) { } public static Builder builder() { - return new com.stripe.param.SourceCreateParams.Redirect.Builder(); + return new Builder(); } public static class Builder { @@ -1475,7 +1473,7 @@ private SourceOrder(Map extraParams, List items, Shipping } public static Builder builder() { - return new com.stripe.param.SourceCreateParams.SourceOrder.Builder(); + return new Builder(); } public static class Builder { @@ -1603,7 +1601,7 @@ private Item( } public static Builder builder() { - return new com.stripe.param.SourceCreateParams.SourceOrder.Item.Builder(); + return new Builder(); } public static class Builder { @@ -1768,7 +1766,7 @@ private Shipping( } public static Builder builder() { - return new com.stripe.param.SourceCreateParams.SourceOrder.Shipping.Builder(); + return new Builder(); } public static class Builder { @@ -1905,7 +1903,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.SourceCreateParams.SourceOrder.Shipping.Address.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SourceRetrieveParams.java b/src/main/java/com/stripe/param/SourceRetrieveParams.java index 2fe466431ce..93a10dea159 100644 --- a/src/main/java/com/stripe/param/SourceRetrieveParams.java +++ b/src/main/java/com/stripe/param/SourceRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -37,7 +35,7 @@ private SourceRetrieveParams( } public static Builder builder() { - return new com.stripe.param.SourceRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SourceSourceTransactionsParams.java b/src/main/java/com/stripe/param/SourceSourceTransactionsParams.java index ea872bcb040..37794f3ac31 100644 --- a/src/main/java/com/stripe/param/SourceSourceTransactionsParams.java +++ b/src/main/java/com/stripe/param/SourceSourceTransactionsParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private SourceSourceTransactionsParams( } public static Builder builder() { - return new com.stripe.param.SourceSourceTransactionsParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SourceUpdateParams.java b/src/main/java/com/stripe/param/SourceUpdateParams.java index 855afa76633..bac73cff106 100644 --- a/src/main/java/com/stripe/param/SourceUpdateParams.java +++ b/src/main/java/com/stripe/param/SourceUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -75,7 +73,7 @@ private SourceUpdateParams( } public static Builder builder() { - return new com.stripe.param.SourceUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -275,7 +273,7 @@ private Mandate( } public static Builder builder() { - return new com.stripe.param.SourceUpdateParams.Mandate.Builder(); + return new Builder(); } public static class Builder { @@ -312,13 +310,13 @@ public Builder setAcceptance(Acceptance acceptance) { } /** The amount specified by the mandate. (Leave null for a mandate covering all amounts) */ - public Builder setAmount(EmptyParam amount) { + public Builder setAmount(Long amount) { this.amount = amount; return this; } /** The amount specified by the mandate. (Leave null for a mandate covering all amounts) */ - public Builder setAmount(Long amount) { + public Builder setAmount(EmptyParam amount) { this.amount = amount; return this; } @@ -450,7 +448,7 @@ private Acceptance( } public static Builder builder() { - return new com.stripe.param.SourceUpdateParams.Mandate.Acceptance.Builder(); + return new Builder(); } public static class Builder { @@ -593,7 +591,7 @@ private Offline(String contactEmail, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.SourceUpdateParams.Mandate.Acceptance.Offline.Builder(); + return new Builder(); } public static class Builder { @@ -679,7 +677,7 @@ private Online(Long date, Map extraParams, String ip, String use } public static Builder builder() { - return new com.stripe.param.SourceUpdateParams.Mandate.Acceptance.Online.Builder(); + return new Builder(); } public static class Builder { @@ -863,7 +861,7 @@ private Owner( } public static Builder builder() { - return new com.stripe.param.SourceUpdateParams.Owner.Builder(); + return new Builder(); } public static class Builder { @@ -979,7 +977,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.SourceUpdateParams.Owner.Address.Builder(); + return new Builder(); } public static class Builder { @@ -1098,7 +1096,7 @@ private SourceOrder(Map extraParams, List items, Shipping } public static Builder builder() { - return new com.stripe.param.SourceUpdateParams.SourceOrder.Builder(); + return new Builder(); } public static class Builder { @@ -1226,7 +1224,7 @@ private Item( } public static Builder builder() { - return new com.stripe.param.SourceUpdateParams.SourceOrder.Item.Builder(); + return new Builder(); } public static class Builder { @@ -1391,7 +1389,7 @@ private Shipping( } public static Builder builder() { - return new com.stripe.param.SourceUpdateParams.SourceOrder.Shipping.Builder(); + return new Builder(); } public static class Builder { @@ -1528,7 +1526,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.SourceUpdateParams.SourceOrder.Shipping.Address.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SourceVerifyParams.java b/src/main/java/com/stripe/param/SourceVerifyParams.java index 65a20d33d93..97e7a28909e 100644 --- a/src/main/java/com/stripe/param/SourceVerifyParams.java +++ b/src/main/java/com/stripe/param/SourceVerifyParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -35,7 +33,7 @@ private SourceVerifyParams( } public static Builder builder() { - return new com.stripe.param.SourceVerifyParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionCancelParams.java b/src/main/java/com/stripe/param/SubscriptionCancelParams.java index 90a3cb9959b..bf9df05c38a 100644 --- a/src/main/java/com/stripe/param/SubscriptionCancelParams.java +++ b/src/main/java/com/stripe/param/SubscriptionCancelParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -39,7 +37,7 @@ private SubscriptionCancelParams( } public static Builder builder() { - return new com.stripe.param.SubscriptionCancelParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionCreateParams.java b/src/main/java/com/stripe/param/SubscriptionCreateParams.java index c6c9997829c..35fbb926af4 100644 --- a/src/main/java/com/stripe/param/SubscriptionCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -273,7 +271,7 @@ private SubscriptionCreateParams( } public static Builder builder() { - return new com.stripe.param.SubscriptionCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -496,7 +494,7 @@ public Builder setDefaultSource(String defaultSource) { * The tax rates that will apply to any subscription item that does not have `tax_rates` set. * Invoices created will have their `default_tax_rates` populated from the subscription. */ - public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { + public Builder setDefaultTaxRates(List defaultTaxRates) { this.defaultTaxRates = defaultTaxRates; return this; } @@ -505,7 +503,7 @@ public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { * The tax rates that will apply to any subscription item that does not have `tax_rates` set. * Invoices created will have their `default_tax_rates` populated from the subscription. */ - public Builder setDefaultTaxRates(List defaultTaxRates) { + public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { this.defaultTaxRates = defaultTaxRates; return this; } @@ -661,7 +659,7 @@ public Builder setProrate(Boolean prorate) { * for further information view the [migration * docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - public Builder setTaxPercent(EmptyParam taxPercent) { + public Builder setTaxPercent(BigDecimal taxPercent) { this.taxPercent = taxPercent; return this; } @@ -675,7 +673,7 @@ public Builder setTaxPercent(EmptyParam taxPercent) { * for further information view the [migration * docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - public Builder setTaxPercent(BigDecimal taxPercent) { + public Builder setTaxPercent(EmptyParam taxPercent) { this.taxPercent = taxPercent; return this; } @@ -764,7 +762,7 @@ private BillingThresholds( } public static Builder builder() { - return new com.stripe.param.SubscriptionCreateParams.BillingThresholds.Builder(); + return new Builder(); } public static class Builder { @@ -880,7 +878,7 @@ private Item( } public static Builder builder() { - return new com.stripe.param.SubscriptionCreateParams.Item.Builder(); + return new Builder(); } public static class Builder { @@ -993,7 +991,7 @@ public Builder setQuantity(Long quantity) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on * the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(EmptyParam taxRates) { + public Builder setTaxRates(List taxRates) { this.taxRates = taxRates; return this; } @@ -1002,7 +1000,7 @@ public Builder setTaxRates(EmptyParam taxRates) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on * the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(List taxRates) { + public Builder setTaxRates(EmptyParam taxRates) { this.taxRates = taxRates; return this; } @@ -1028,7 +1026,7 @@ private BillingThresholds(Map extraParams, Long usageGte) { } public static Builder builder() { - return new com.stripe.param.SubscriptionCreateParams.Item.BillingThresholds.Builder(); + return new Builder(); } public static class Builder { @@ -1098,7 +1096,7 @@ private TransferData(String destination, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.SubscriptionCreateParams.TransferData.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionItemCreateParams.java b/src/main/java/com/stripe/param/SubscriptionItemCreateParams.java index 5288f2e1867..be87b37f961 100644 --- a/src/main/java/com/stripe/param/SubscriptionItemCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionItemCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -96,7 +94,7 @@ private SubscriptionItemCreateParams( } public static Builder builder() { - return new com.stripe.param.SubscriptionItemCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -273,7 +271,7 @@ public Builder setSubscription(String subscription) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on * the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(EmptyParam taxRates) { + public Builder setTaxRates(List taxRates) { this.taxRates = taxRates; return this; } @@ -282,7 +280,7 @@ public Builder setTaxRates(EmptyParam taxRates) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on * the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(List taxRates) { + public Builder setTaxRates(EmptyParam taxRates) { this.taxRates = taxRates; return this; } @@ -308,7 +306,7 @@ private BillingThresholds(Map extraParams, Long usageGte) { } public static Builder builder() { - return new com.stripe.param.SubscriptionItemCreateParams.BillingThresholds.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionItemDeleteParams.java b/src/main/java/com/stripe/param/SubscriptionItemDeleteParams.java index f61d49cdb1f..7d2e3107ddc 100644 --- a/src/main/java/com/stripe/param/SubscriptionItemDeleteParams.java +++ b/src/main/java/com/stripe/param/SubscriptionItemDeleteParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -48,7 +46,7 @@ private SubscriptionItemDeleteParams( } public static Builder builder() { - return new com.stripe.param.SubscriptionItemDeleteParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionItemListParams.java b/src/main/java/com/stripe/param/SubscriptionItemListParams.java index c1dbe9e92ff..4e20a764322 100644 --- a/src/main/java/com/stripe/param/SubscriptionItemListParams.java +++ b/src/main/java/com/stripe/param/SubscriptionItemListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -68,7 +66,7 @@ private SubscriptionItemListParams( } public static Builder builder() { - return new com.stripe.param.SubscriptionItemListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionItemRetrieveParams.java b/src/main/java/com/stripe/param/SubscriptionItemRetrieveParams.java index 002aab82dd2..a8afb1dd5be 100644 --- a/src/main/java/com/stripe/param/SubscriptionItemRetrieveParams.java +++ b/src/main/java/com/stripe/param/SubscriptionItemRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private SubscriptionItemRetrieveParams(List expand, Map } public static Builder builder() { - return new com.stripe.param.SubscriptionItemRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionItemUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionItemUpdateParams.java index 406e09fa92d..1edf9ee16f0 100644 --- a/src/main/java/com/stripe/param/SubscriptionItemUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionItemUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -101,7 +99,7 @@ private SubscriptionItemUpdateParams( } public static Builder builder() { - return new com.stripe.param.SubscriptionItemUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -285,7 +283,7 @@ public Builder setQuantity(Long quantity) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on * the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(EmptyParam taxRates) { + public Builder setTaxRates(List taxRates) { this.taxRates = taxRates; return this; } @@ -294,7 +292,7 @@ public Builder setTaxRates(EmptyParam taxRates) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on * the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(List taxRates) { + public Builder setTaxRates(EmptyParam taxRates) { this.taxRates = taxRates; return this; } @@ -320,7 +318,7 @@ private BillingThresholds(Map extraParams, Long usageGte) { } public static Builder builder() { - return new com.stripe.param.SubscriptionItemUpdateParams.BillingThresholds.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionItemUsageRecordSummariesParams.java b/src/main/java/com/stripe/param/SubscriptionItemUsageRecordSummariesParams.java index 3c5ef027c4f..3f5bcbb2f8e 100644 --- a/src/main/java/com/stripe/param/SubscriptionItemUsageRecordSummariesParams.java +++ b/src/main/java/com/stripe/param/SubscriptionItemUsageRecordSummariesParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private SubscriptionItemUsageRecordSummariesParams( } public static Builder builder() { - return new com.stripe.param.SubscriptionItemUsageRecordSummariesParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionListParams.java b/src/main/java/com/stripe/param/SubscriptionListParams.java index 2f83531f57f..f09a3055fd2 100644 --- a/src/main/java/com/stripe/param/SubscriptionListParams.java +++ b/src/main/java/com/stripe/param/SubscriptionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -118,7 +116,7 @@ private SubscriptionListParams( } public static Builder builder() { - return new com.stripe.param.SubscriptionListParams.Builder(); + return new Builder(); } public static class Builder { @@ -356,7 +354,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.SubscriptionListParams.Created.Builder(); + return new Builder(); } public static class Builder { @@ -463,7 +461,7 @@ private CurrentPeriodEnd( } public static Builder builder() { - return new com.stripe.param.SubscriptionListParams.CurrentPeriodEnd.Builder(); + return new Builder(); } public static class Builder { @@ -571,7 +569,7 @@ private CurrentPeriodStart( } public static Builder builder() { - return new com.stripe.param.SubscriptionListParams.CurrentPeriodStart.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionRetrieveParams.java b/src/main/java/com/stripe/param/SubscriptionRetrieveParams.java index 45096008398..0a3b76ba5d1 100644 --- a/src/main/java/com/stripe/param/SubscriptionRetrieveParams.java +++ b/src/main/java/com/stripe/param/SubscriptionRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private SubscriptionRetrieveParams(List expand, Map extr } public static Builder builder() { - return new com.stripe.param.SubscriptionRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleCancelParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleCancelParams.java index bedf3b9fc1e..ab841e5f195 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleCancelParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleCancelParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -47,7 +45,7 @@ private SubscriptionScheduleCancelParams( } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleCancelParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java index 664c758d833..93bfebe0bf6 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -157,7 +155,7 @@ private SubscriptionScheduleCreateParams( } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -427,13 +425,13 @@ public Builder setRenewalInterval(RenewalInterval renewalInterval) { } /** The date at which the subscription schedule starts. */ - public Builder setStartDate(StartDate startDate) { + public Builder setStartDate(Long startDate) { this.startDate = startDate; return this; } /** The date at which the subscription schedule starts. */ - public Builder setStartDate(Long startDate) { + public Builder setStartDate(StartDate startDate) { this.startDate = startDate; return this; } @@ -469,7 +467,7 @@ private BillingThresholds( } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleCreateParams.BillingThresholds.Builder(); + return new Builder(); } public static class Builder { @@ -550,7 +548,7 @@ private InvoiceSettings(Long daysUntilDue, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleCreateParams.InvoiceSettings.Builder(); + return new Builder(); } public static class Builder { @@ -736,7 +734,7 @@ private Phase( } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleCreateParams.Phase.Builder(); + return new Builder(); } public static class Builder { @@ -849,7 +847,7 @@ public Builder setDefaultPaymentMethod(String defaultPaymentMethod) { * The tax rates that will apply to any phase that does not have `tax_rates` set. Invoices * created will have their `default_tax_rates` populated from the phase. */ - public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { + public Builder setDefaultTaxRates(List defaultTaxRates) { this.defaultTaxRates = defaultTaxRates; return this; } @@ -858,7 +856,7 @@ public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { * The tax rates that will apply to any phase that does not have `tax_rates` set. Invoices * created will have their `default_tax_rates` populated from the phase. */ - public Builder setDefaultTaxRates(List defaultTaxRates) { + public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { this.defaultTaxRates = defaultTaxRates; return this; } @@ -1003,8 +1001,7 @@ private BillingThresholds( } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleCreateParams.Phase.BillingThresholds - .Builder(); + return new Builder(); } public static class Builder { @@ -1085,8 +1082,7 @@ private InvoiceSettings(Long daysUntilDue, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleCreateParams.Phase.InvoiceSettings - .Builder(); + return new Builder(); } public static class Builder { @@ -1183,7 +1179,7 @@ private Plan( } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleCreateParams.Phase.Plan.Builder(); + return new Builder(); } public static class Builder { @@ -1268,7 +1264,7 @@ public Builder setQuantity(Long quantity) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` * on the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(EmptyParam taxRates) { + public Builder setTaxRates(List taxRates) { this.taxRates = taxRates; return this; } @@ -1277,7 +1273,7 @@ public Builder setTaxRates(EmptyParam taxRates) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` * on the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(List taxRates) { + public Builder setTaxRates(EmptyParam taxRates) { this.taxRates = taxRates; return this; } @@ -1304,8 +1300,7 @@ private BillingThresholds(Map extraParams, Long usageGte) { } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleCreateParams.Phase.Plan.BillingThresholds - .Builder(); + return new Builder(); } public static class Builder { @@ -1401,7 +1396,7 @@ private RenewalInterval(Map extraParams, Interval interval, Long } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleCreateParams.RenewalInterval.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleListParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleListParams.java index f051ca928c9..5b52b977b83 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleListParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -98,7 +96,7 @@ private SubscriptionScheduleListParams( } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleListParams.Builder(); + return new Builder(); } public static class Builder { @@ -319,7 +317,7 @@ private CanceledAt(Map extraParams, Long gt, Long gte, Long lt, } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleListParams.CanceledAt.Builder(); + return new Builder(); } public static class Builder { @@ -426,7 +424,7 @@ private CompletedAt(Map extraParams, Long gt, Long gte, Long lt, } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleListParams.CompletedAt.Builder(); + return new Builder(); } public static class Builder { @@ -533,7 +531,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleListParams.Created.Builder(); + return new Builder(); } public static class Builder { @@ -639,7 +637,7 @@ private ReleasedAt(Map extraParams, Long gt, Long gte, Long lt, } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleListParams.ReleasedAt.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleReleaseParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleReleaseParams.java index 76344c2d138..c1e6cb08544 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleReleaseParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleReleaseParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -35,7 +33,7 @@ private SubscriptionScheduleReleaseParams( } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleReleaseParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleRetrieveParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleRetrieveParams.java index 8489a813d31..9d5da84707d 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleRetrieveParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private SubscriptionScheduleRetrieveParams(List expand, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleUpdateParams.InvoiceSettings.Builder(); + return new Builder(); } public static class Builder { @@ -703,7 +701,7 @@ private Phase( } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleUpdateParams.Phase.Builder(); + return new Builder(); } public static class Builder { @@ -819,7 +817,7 @@ public Builder setDefaultPaymentMethod(String defaultPaymentMethod) { * The tax rates that will apply to any phase that does not have `tax_rates` set. Invoices * created will have their `default_tax_rates` populated from the phase. */ - public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { + public Builder setDefaultTaxRates(List defaultTaxRates) { this.defaultTaxRates = defaultTaxRates; return this; } @@ -828,7 +826,7 @@ public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { * The tax rates that will apply to any phase that does not have `tax_rates` set. Invoices * created will have their `default_tax_rates` populated from the phase. */ - public Builder setDefaultTaxRates(List defaultTaxRates) { + public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { this.defaultTaxRates = defaultTaxRates; return this; } @@ -837,7 +835,7 @@ public Builder setDefaultTaxRates(List defaultTaxRates) { * The date at which this phase of the subscription schedule ends. If set, `iterations` must * not be set. */ - public Builder setEndDate(EndDate endDate) { + public Builder setEndDate(Long endDate) { this.endDate = endDate; return this; } @@ -846,7 +844,7 @@ public Builder setEndDate(EndDate endDate) { * The date at which this phase of the subscription schedule ends. If set, `iterations` must * not be set. */ - public Builder setEndDate(Long endDate) { + public Builder setEndDate(EndDate endDate) { this.endDate = endDate; return this; } @@ -920,13 +918,13 @@ public Builder addAllPlan(List elements) { } /** The date at which this phase of the subscription schedule starts. */ - public Builder setStartDate(StartDate startDate) { + public Builder setStartDate(Long startDate) { this.startDate = startDate; return this; } /** The date at which this phase of the subscription schedule starts. */ - public Builder setStartDate(Long startDate) { + public Builder setStartDate(StartDate startDate) { this.startDate = startDate; return this; } @@ -958,7 +956,7 @@ public Builder setTrial(Boolean trial) { * Sets the phase to trialing from the start date to this date. Must be before the phase end * date, can not be combined with `trial` */ - public Builder setTrialEnd(TrialEnd trialEnd) { + public Builder setTrialEnd(Long trialEnd) { this.trialEnd = trialEnd; return this; } @@ -967,7 +965,7 @@ public Builder setTrialEnd(TrialEnd trialEnd) { * Sets the phase to trialing from the start date to this date. Must be before the phase end * date, can not be combined with `trial` */ - public Builder setTrialEnd(Long trialEnd) { + public Builder setTrialEnd(TrialEnd trialEnd) { this.trialEnd = trialEnd; return this; } @@ -1003,8 +1001,7 @@ private BillingThresholds( } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleUpdateParams.Phase.BillingThresholds - .Builder(); + return new Builder(); } public static class Builder { @@ -1085,8 +1082,7 @@ private InvoiceSettings(Long daysUntilDue, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleUpdateParams.Phase.InvoiceSettings - .Builder(); + return new Builder(); } public static class Builder { @@ -1183,7 +1179,7 @@ private Plan( } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleUpdateParams.Phase.Plan.Builder(); + return new Builder(); } public static class Builder { @@ -1268,7 +1264,7 @@ public Builder setQuantity(Long quantity) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` * on the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(EmptyParam taxRates) { + public Builder setTaxRates(List taxRates) { this.taxRates = taxRates; return this; } @@ -1277,7 +1273,7 @@ public Builder setTaxRates(EmptyParam taxRates) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` * on the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(List taxRates) { + public Builder setTaxRates(EmptyParam taxRates) { this.taxRates = taxRates; return this; } @@ -1304,8 +1300,7 @@ private BillingThresholds(Map extraParams, Long usageGte) { } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleUpdateParams.Phase.Plan.BillingThresholds - .Builder(); + return new Builder(); } public static class Builder { @@ -1437,7 +1432,7 @@ private RenewalInterval(Map extraParams, Interval interval, Long } public static Builder builder() { - return new com.stripe.param.SubscriptionScheduleUpdateParams.RenewalInterval.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java index ede65d2fa6d..5e7a3f9ebf7 100644 --- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -259,7 +257,7 @@ private SubscriptionUpdateParams( } public static Builder builder() { - return new com.stripe.param.SubscriptionUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -393,7 +391,7 @@ public Builder setBillingThresholds(EmptyParam billingThresholds) { * A timestamp at which the subscription should cancel. If set to a date before the current * period ends this will cause a proration if `prorate=true`. */ - public Builder setCancelAt(EmptyParam cancelAt) { + public Builder setCancelAt(Long cancelAt) { this.cancelAt = cancelAt; return this; } @@ -402,7 +400,7 @@ public Builder setCancelAt(EmptyParam cancelAt) { * A timestamp at which the subscription should cancel. If set to a date before the current * period ends this will cause a proration if `prorate=true`. */ - public Builder setCancelAt(Long cancelAt) { + public Builder setCancelAt(EmptyParam cancelAt) { this.cancelAt = cancelAt; return this; } @@ -468,7 +466,7 @@ public Builder setDefaultSource(String defaultSource) { * The tax rates that will apply to any subscription item that does not have `tax_rates` set. * Invoices created will have their `default_tax_rates` populated from the subscription. */ - public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { + public Builder setDefaultTaxRates(List defaultTaxRates) { this.defaultTaxRates = defaultTaxRates; return this; } @@ -477,7 +475,7 @@ public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { * The tax rates that will apply to any subscription item that does not have `tax_rates` set. * Invoices created will have their `default_tax_rates` populated from the subscription. */ - public Builder setDefaultTaxRates(List defaultTaxRates) { + public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { this.defaultTaxRates = defaultTaxRates; return this; } @@ -645,7 +643,7 @@ public Builder setProrationDate(Long prorationDate) { * for further information view the [migration * docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - public Builder setTaxPercent(EmptyParam taxPercent) { + public Builder setTaxPercent(BigDecimal taxPercent) { this.taxPercent = taxPercent; return this; } @@ -659,7 +657,7 @@ public Builder setTaxPercent(EmptyParam taxPercent) { * for further information view the [migration * docs](https://stripe.com/docs/billing/migration/taxes) for `tax_rates`. */ - public Builder setTaxPercent(BigDecimal taxPercent) { + public Builder setTaxPercent(EmptyParam taxPercent) { this.taxPercent = taxPercent; return this; } @@ -749,7 +747,7 @@ private BillingThresholds( } public static Builder builder() { - return new com.stripe.param.SubscriptionUpdateParams.BillingThresholds.Builder(); + return new Builder(); } public static class Builder { @@ -886,7 +884,7 @@ private Item( } public static Builder builder() { - return new com.stripe.param.SubscriptionUpdateParams.Item.Builder(); + return new Builder(); } public static class Builder { @@ -1029,7 +1027,7 @@ public Builder setQuantity(Long quantity) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on * the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(EmptyParam taxRates) { + public Builder setTaxRates(List taxRates) { this.taxRates = taxRates; return this; } @@ -1038,7 +1036,7 @@ public Builder setTaxRates(EmptyParam taxRates) { * The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on * the subscription do not apply to this `subscription_item`. */ - public Builder setTaxRates(List taxRates) { + public Builder setTaxRates(EmptyParam taxRates) { this.taxRates = taxRates; return this; } @@ -1064,7 +1062,7 @@ private BillingThresholds(Map extraParams, Long usageGte) { } public static Builder builder() { - return new com.stripe.param.SubscriptionUpdateParams.Item.BillingThresholds.Builder(); + return new Builder(); } public static class Builder { @@ -1134,7 +1132,7 @@ private TransferData(String destination, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.SubscriptionUpdateParams.TransferData.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java index 7a4cbd643f5..dcd00321293 100644 --- a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -41,7 +39,7 @@ private TaxIdCollectionCreateParams( } public static Builder builder() { - return new com.stripe.param.TaxIdCollectionCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TaxIdCollectionListParams.java b/src/main/java/com/stripe/param/TaxIdCollectionListParams.java index 7e3727e3373..76013bae144 100644 --- a/src/main/java/com/stripe/param/TaxIdCollectionListParams.java +++ b/src/main/java/com/stripe/param/TaxIdCollectionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private TaxIdCollectionListParams( } public static Builder builder() { - return new com.stripe.param.TaxIdCollectionListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TaxIdCollectionRetrieveParams.java b/src/main/java/com/stripe/param/TaxIdCollectionRetrieveParams.java index 274ec1c1754..8b06c49f42a 100644 --- a/src/main/java/com/stripe/param/TaxIdCollectionRetrieveParams.java +++ b/src/main/java/com/stripe/param/TaxIdCollectionRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private TaxIdCollectionRetrieveParams(List expand, Map e } public static Builder builder() { - return new com.stripe.param.TaxIdCollectionRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TaxRateCreateParams.java b/src/main/java/com/stripe/param/TaxRateCreateParams.java index 7c3c64b6ec9..2b0f229f0f0 100644 --- a/src/main/java/com/stripe/param/TaxRateCreateParams.java +++ b/src/main/java/com/stripe/param/TaxRateCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -84,7 +82,7 @@ private TaxRateCreateParams( } public static Builder builder() { - return new com.stripe.param.TaxRateCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TaxRateListParams.java b/src/main/java/com/stripe/param/TaxRateListParams.java index a49ab104089..b0c924cf01d 100644 --- a/src/main/java/com/stripe/param/TaxRateListParams.java +++ b/src/main/java/com/stripe/param/TaxRateListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -86,7 +84,7 @@ private TaxRateListParams( } public static Builder builder() { - return new com.stripe.param.TaxRateListParams.Builder(); + return new Builder(); } public static class Builder { @@ -279,7 +277,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.TaxRateListParams.Created.Builder(); + return new Builder(); } public static class Builder { @@ -385,7 +383,7 @@ private Percentage(Map extraParams, Long gt, Long gte, Long lt, } public static Builder builder() { - return new com.stripe.param.TaxRateListParams.Percentage.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TaxRateRetrieveParams.java b/src/main/java/com/stripe/param/TaxRateRetrieveParams.java index ef90dc2fc29..8a8371ef61f 100644 --- a/src/main/java/com/stripe/param/TaxRateRetrieveParams.java +++ b/src/main/java/com/stripe/param/TaxRateRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private TaxRateRetrieveParams(List expand, Map extraPara } public static Builder builder() { - return new com.stripe.param.TaxRateRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TaxRateUpdateParams.java b/src/main/java/com/stripe/param/TaxRateUpdateParams.java index b716ca28a39..94a1b92899b 100644 --- a/src/main/java/com/stripe/param/TaxRateUpdateParams.java +++ b/src/main/java/com/stripe/param/TaxRateUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -71,7 +69,7 @@ private TaxRateUpdateParams( } public static Builder builder() { - return new com.stripe.param.TaxRateUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ThreeDSecureCreateParams.java b/src/main/java/com/stripe/param/ThreeDSecureCreateParams.java index cb67404556c..dc08ac6d3b1 100644 --- a/src/main/java/com/stripe/param/ThreeDSecureCreateParams.java +++ b/src/main/java/com/stripe/param/ThreeDSecureCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -63,7 +61,7 @@ private ThreeDSecureCreateParams( } public static Builder builder() { - return new com.stripe.param.ThreeDSecureCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/ThreeDSecureRetrieveParams.java b/src/main/java/com/stripe/param/ThreeDSecureRetrieveParams.java index 1e7ac144a19..961d23d82af 100644 --- a/src/main/java/com/stripe/param/ThreeDSecureRetrieveParams.java +++ b/src/main/java/com/stripe/param/ThreeDSecureRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ThreeDSecureRetrieveParams(List expand, Map extr } public static Builder builder() { - return new com.stripe.param.ThreeDSecureRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index ae661668664..c565bd53dff 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -61,7 +59,7 @@ private TokenCreateParams( } public static Builder builder() { - return new com.stripe.param.TokenCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -236,7 +234,7 @@ private BankAccount( } public static Builder builder() { - return new com.stripe.param.TokenCreateParams.BankAccount.Builder(); + return new Builder(); } public static class Builder { @@ -435,7 +433,7 @@ private Card( } public static Builder builder() { - return new com.stripe.param.TokenCreateParams.Card.Builder(); + return new Builder(); } public static class Builder { @@ -591,7 +589,7 @@ private Pii(Map extraParams, String idNumber) { } public static Builder builder() { - return new com.stripe.param.TokenCreateParams.Pii.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TokenRetrieveParams.java b/src/main/java/com/stripe/param/TokenRetrieveParams.java index 8eb229e46d0..27d754b6632 100644 --- a/src/main/java/com/stripe/param/TokenRetrieveParams.java +++ b/src/main/java/com/stripe/param/TokenRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private TokenRetrieveParams(List expand, Map extraParams } public static Builder builder() { - return new com.stripe.param.TokenRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TopupCancelParams.java b/src/main/java/com/stripe/param/TopupCancelParams.java index 20b5058acd9..3b13e88bdd3 100644 --- a/src/main/java/com/stripe/param/TopupCancelParams.java +++ b/src/main/java/com/stripe/param/TopupCancelParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private TopupCancelParams(List expand, Map extraParams) } public static Builder builder() { - return new com.stripe.param.TopupCancelParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TopupCreateParams.java b/src/main/java/com/stripe/param/TopupCreateParams.java index bfcf75b8147..4884fc20ce4 100644 --- a/src/main/java/com/stripe/param/TopupCreateParams.java +++ b/src/main/java/com/stripe/param/TopupCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -87,7 +85,7 @@ private TopupCreateParams( } public static Builder builder() { - return new com.stripe.param.TopupCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TopupListParams.java b/src/main/java/com/stripe/param/TopupListParams.java index f79c29eadff..0fb69feea78 100644 --- a/src/main/java/com/stripe/param/TopupListParams.java +++ b/src/main/java/com/stripe/param/TopupListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -87,7 +85,7 @@ private TopupListParams( } public static Builder builder() { - return new com.stripe.param.TopupListParams.Builder(); + return new Builder(); } public static class Builder { @@ -278,7 +276,7 @@ private Amount(Map extraParams, Long gt, Long gte, Long lt, Long } public static Builder builder() { - return new com.stripe.param.TopupListParams.Amount.Builder(); + return new Builder(); } public static class Builder { @@ -384,7 +382,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.TopupListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TopupRetrieveParams.java b/src/main/java/com/stripe/param/TopupRetrieveParams.java index 83c6713cbc3..8e96de0d847 100644 --- a/src/main/java/com/stripe/param/TopupRetrieveParams.java +++ b/src/main/java/com/stripe/param/TopupRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private TopupRetrieveParams(List expand, Map extraParams } public static Builder builder() { - return new com.stripe.param.TopupRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TopupUpdateParams.java b/src/main/java/com/stripe/param/TopupUpdateParams.java index f44d562ad35..84c0fd0a7d6 100644 --- a/src/main/java/com/stripe/param/TopupUpdateParams.java +++ b/src/main/java/com/stripe/param/TopupUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -46,7 +44,7 @@ private TopupUpdateParams( } public static Builder builder() { - return new com.stripe.param.TopupUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TransferCreateParams.java b/src/main/java/com/stripe/param/TransferCreateParams.java index 1edfe19b511..92b4064a9cc 100644 --- a/src/main/java/com/stripe/param/TransferCreateParams.java +++ b/src/main/java/com/stripe/param/TransferCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -100,7 +98,7 @@ private TransferCreateParams( } public static Builder builder() { - return new com.stripe.param.TransferCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TransferListParams.java b/src/main/java/com/stripe/param/TransferListParams.java index 240fb0a5a0a..40dad360a59 100644 --- a/src/main/java/com/stripe/param/TransferListParams.java +++ b/src/main/java/com/stripe/param/TransferListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -79,7 +77,7 @@ private TransferListParams( } public static Builder builder() { - return new com.stripe.param.TransferListParams.Builder(); + return new Builder(); } public static class Builder { @@ -253,7 +251,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.TransferListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TransferRetrieveParams.java b/src/main/java/com/stripe/param/TransferRetrieveParams.java index 9af0e4bc6f6..cf7c12be73e 100644 --- a/src/main/java/com/stripe/param/TransferRetrieveParams.java +++ b/src/main/java/com/stripe/param/TransferRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private TransferRetrieveParams(List expand, Map extraPar } public static Builder builder() { - return new com.stripe.param.TransferRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TransferReversalCollectionCreateParams.java b/src/main/java/com/stripe/param/TransferReversalCollectionCreateParams.java index cdfdb47b438..db29ac687db 100644 --- a/src/main/java/com/stripe/param/TransferReversalCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/TransferReversalCollectionCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -71,7 +69,7 @@ private TransferReversalCollectionCreateParams( } public static Builder builder() { - return new com.stripe.param.TransferReversalCollectionCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TransferReversalCollectionListParams.java b/src/main/java/com/stripe/param/TransferReversalCollectionListParams.java index 87f40a6b5da..222f4e2ccb9 100644 --- a/src/main/java/com/stripe/param/TransferReversalCollectionListParams.java +++ b/src/main/java/com/stripe/param/TransferReversalCollectionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private TransferReversalCollectionListParams( } public static Builder builder() { - return new com.stripe.param.TransferReversalCollectionListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TransferReversalCollectionRetrieveParams.java b/src/main/java/com/stripe/param/TransferReversalCollectionRetrieveParams.java index 73c252b75db..b9ccf36aa2e 100644 --- a/src/main/java/com/stripe/param/TransferReversalCollectionRetrieveParams.java +++ b/src/main/java/com/stripe/param/TransferReversalCollectionRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -30,7 +28,7 @@ private TransferReversalCollectionRetrieveParams( } public static Builder builder() { - return new com.stripe.param.TransferReversalCollectionRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TransferReversalUpdateParams.java b/src/main/java/com/stripe/param/TransferReversalUpdateParams.java index 2f4a25f034e..739ddb187d1 100644 --- a/src/main/java/com/stripe/param/TransferReversalUpdateParams.java +++ b/src/main/java/com/stripe/param/TransferReversalUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -39,7 +37,7 @@ private TransferReversalUpdateParams( } public static Builder builder() { - return new com.stripe.param.TransferReversalUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/TransferUpdateParams.java b/src/main/java/com/stripe/param/TransferUpdateParams.java index e925869c38c..0123b6dff42 100644 --- a/src/main/java/com/stripe/param/TransferUpdateParams.java +++ b/src/main/java/com/stripe/param/TransferUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -47,7 +45,7 @@ private TransferUpdateParams( } public static Builder builder() { - return new com.stripe.param.TransferUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/UsageRecordCreateOnSubscriptionItemParams.java b/src/main/java/com/stripe/param/UsageRecordCreateOnSubscriptionItemParams.java index 690dff5c65e..b8b906e0653 100644 --- a/src/main/java/com/stripe/param/UsageRecordCreateOnSubscriptionItemParams.java +++ b/src/main/java/com/stripe/param/UsageRecordCreateOnSubscriptionItemParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -59,7 +57,7 @@ private UsageRecordCreateOnSubscriptionItemParams( } public static Builder builder() { - return new com.stripe.param.UsageRecordCreateOnSubscriptionItemParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index 954a8fc3e10..1a311648fa7 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -64,7 +62,7 @@ private WebhookEndpointCreateParams( } public static Builder builder() { - return new com.stripe.param.WebhookEndpointCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/WebhookEndpointListParams.java b/src/main/java/com/stripe/param/WebhookEndpointListParams.java index a8aeda835df..e2fcef323e6 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointListParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private WebhookEndpointListParams( } public static Builder builder() { - return new com.stripe.param.WebhookEndpointListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/WebhookEndpointRetrieveParams.java b/src/main/java/com/stripe/param/WebhookEndpointRetrieveParams.java index 226c7b46ab2..761b7e2b3ee 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointRetrieveParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private WebhookEndpointRetrieveParams(List expand, Map e } public static Builder builder() { - return new com.stripe.param.WebhookEndpointRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index 62ae38c0285..e8382babe93 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param; import com.google.gson.annotations.SerializedName; @@ -52,7 +50,7 @@ private WebhookEndpointUpdateParams( } public static Builder builder() { - return new com.stripe.param.WebhookEndpointUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 9a46671da8d..fe72afea21c 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.checkout; import com.google.gson.annotations.SerializedName; @@ -156,7 +154,7 @@ private SessionCreateParams( } public static Builder builder() { - return new com.stripe.param.checkout.SessionCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -479,7 +477,7 @@ private LineItem( } public static Builder builder() { - return new com.stripe.param.checkout.SessionCreateParams.LineItem.Builder(); + return new Builder(); } public static class Builder { @@ -711,7 +709,7 @@ private PaymentIntentData( } public static Builder builder() { - return new com.stripe.param.checkout.SessionCreateParams.PaymentIntentData.Builder(); + return new Builder(); } public static class Builder { @@ -945,8 +943,7 @@ private Shipping( } public static Builder builder() { - return new com.stripe.param.checkout.SessionCreateParams.PaymentIntentData.Shipping - .Builder(); + return new Builder(); } public static class Builder { @@ -1083,8 +1080,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.checkout.SessionCreateParams.PaymentIntentData.Shipping - .Address.Builder(); + return new Builder(); } public static class Builder { @@ -1199,8 +1195,7 @@ private TransferData(String destination, Map extraParams) { } public static Builder builder() { - return new com.stripe.param.checkout.SessionCreateParams.PaymentIntentData.TransferData - .Builder(); + return new Builder(); } public static class Builder { @@ -1322,7 +1317,7 @@ private SetupIntentData( } public static Builder builder() { - return new com.stripe.param.checkout.SessionCreateParams.SetupIntentData.Builder(); + return new Builder(); } public static class Builder { @@ -1471,7 +1466,7 @@ private SubscriptionData( } public static Builder builder() { - return new com.stripe.param.checkout.SessionCreateParams.SubscriptionData.Builder(); + return new Builder(); } public static class Builder { @@ -1633,7 +1628,7 @@ private Item(Map extraParams, String plan, Long quantity) { } public static Builder builder() { - return new com.stripe.param.checkout.SessionCreateParams.SubscriptionData.Item.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/checkout/SessionRetrieveParams.java b/src/main/java/com/stripe/param/checkout/SessionRetrieveParams.java index 15673570c28..f659463e877 100644 --- a/src/main/java/com/stripe/param/checkout/SessionRetrieveParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.checkout; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private SessionRetrieveParams(List expand, Map extraPara } public static Builder builder() { - return new com.stripe.param.checkout.SessionRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationApproveParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationApproveParams.java index d9ab59475f1..fcda836d4e0 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationApproveParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationApproveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -40,7 +38,7 @@ private AuthorizationApproveParams( } public static Builder builder() { - return new com.stripe.param.issuing.AuthorizationApproveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationDeclineParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationDeclineParams.java index b9492a847e8..b71201c3ce5 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationDeclineParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationDeclineParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private AuthorizationDeclineParams(List expand, Map extr } public static Builder builder() { - return new com.stripe.param.issuing.AuthorizationDeclineParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationListParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationListParams.java index 92982b0bf03..3af3cd32d18 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationListParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -89,7 +87,7 @@ private AuthorizationListParams( } public static Builder builder() { - return new com.stripe.param.issuing.AuthorizationListParams.Builder(); + return new Builder(); } public static class Builder { @@ -276,7 +274,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.issuing.AuthorizationListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationRetrieveParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationRetrieveParams.java index 5b035c49eae..a8c342db536 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationRetrieveParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private AuthorizationRetrieveParams(List expand, Map ext } public static Builder builder() { - return new com.stripe.param.issuing.AuthorizationRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationUpdateParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationUpdateParams.java index 343775c88e8..59e4fb8876e 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -34,7 +32,7 @@ private AuthorizationUpdateParams( } public static Builder builder() { - return new com.stripe.param.issuing.AuthorizationUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/CardCreateParams.java b/src/main/java/com/stripe/param/issuing/CardCreateParams.java index 20cc785fe0a..76a8a0caf90 100644 --- a/src/main/java/com/stripe/param/issuing/CardCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardCreateParams.java @@ -1,9 +1,8 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiRequestParams.EnumParam; import com.stripe.param.common.EmptyParam; import java.util.ArrayList; import java.util.HashMap; @@ -99,7 +98,7 @@ private CardCreateParams( } public static Builder builder() { - return new com.stripe.param.issuing.CardCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -342,7 +341,7 @@ private AuthorizationControls( } public static Builder builder() { - return new com.stripe.param.issuing.CardCreateParams.AuthorizationControls.Builder(); + return new Builder(); } public static class Builder { @@ -369,6 +368,20 @@ public AuthorizationControls build() { this.spendingLimits); } + /** + * Add an element to `allowedCategories` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardCreateParams.AuthorizationControls#allowedCategories} for the field + * documentation. + */ + public Builder addAllowedCategory(AllowedCategory element) { + if (this.allowedCategories == null) { + this.allowedCategories = new ArrayList<>(); + } + this.allowedCategories.add(element); + return this; + } + /** * Add all elements to `allowedCategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. See @@ -481,20 +494,6 @@ public Builder addAllSpendingLimit(List elements) { this.spendingLimits.addAll(elements); return this; } - - /** - * Add an element to `allowedCategories` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. See - * {@link CardCreateParams.AuthorizationControls#allowedCategories} for the field - * documentation. - */ - public Builder addAllowedCategory(AllowedCategory element) { - if (this.allowedCategories == null) { - this.allowedCategories = new ArrayList<>(); - } - this.allowedCategories.add(element); - return this; - } } public static class SpendingLimit { @@ -538,8 +537,7 @@ private SpendingLimit( } public static Builder builder() { - return new com.stripe.param.issuing.CardCreateParams.AuthorizationControls.SpendingLimit - .Builder(); + return new Builder(); } public static class Builder { @@ -3330,13 +3328,10 @@ public static class Shipping { * individual ones will not. */ @SerializedName("type") - ApiRequestParams.EnumParam type; + EnumParam type; private Shipping( - Address address, - Map extraParams, - String name, - ApiRequestParams.EnumParam type) { + Address address, Map extraParams, String name, EnumParam type) { this.address = address; this.extraParams = extraParams; this.name = name; @@ -3344,7 +3339,7 @@ private Shipping( } public static Builder builder() { - return new com.stripe.param.issuing.CardCreateParams.Shipping.Builder(); + return new Builder(); } public static class Builder { @@ -3354,7 +3349,7 @@ public static class Builder { private String name; - private ApiRequestParams.EnumParam type; + private EnumParam type; /** Finalize and obtain parameter instance from this builder. */ public Shipping build() { @@ -3462,7 +3457,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.issuing.CardCreateParams.Shipping.Address.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/CardDetailsParams.java b/src/main/java/com/stripe/param/issuing/CardDetailsParams.java index 14bc101178d..66ec8062b2a 100644 --- a/src/main/java/com/stripe/param/issuing/CardDetailsParams.java +++ b/src/main/java/com/stripe/param/issuing/CardDetailsParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private CardDetailsParams(List expand, Map extraParams) } public static Builder builder() { - return new com.stripe.param.issuing.CardDetailsParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/CardListParams.java b/src/main/java/com/stripe/param/issuing/CardListParams.java index 2fb6b779e54..5c39e82ba53 100644 --- a/src/main/java/com/stripe/param/issuing/CardListParams.java +++ b/src/main/java/com/stripe/param/issuing/CardListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -120,7 +118,7 @@ private CardListParams( } public static Builder builder() { - return new com.stripe.param.issuing.CardListParams.Builder(); + return new Builder(); } public static class Builder { @@ -353,7 +351,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.issuing.CardListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/CardRetrieveParams.java b/src/main/java/com/stripe/param/issuing/CardRetrieveParams.java index 6a88a854ab3..199ff40e3fb 100644 --- a/src/main/java/com/stripe/param/issuing/CardRetrieveParams.java +++ b/src/main/java/com/stripe/param/issuing/CardRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private CardRetrieveParams(List expand, Map extraParams) } public static Builder builder() { - return new com.stripe.param.issuing.CardRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java index 4f5727239cb..4b7617774d7 100644 --- a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -65,7 +63,7 @@ private CardUpdateParams( } public static Builder builder() { - return new com.stripe.param.issuing.CardUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -260,7 +258,7 @@ private AuthorizationControls( } public static Builder builder() { - return new com.stripe.param.issuing.CardUpdateParams.AuthorizationControls.Builder(); + return new Builder(); } public static class Builder { @@ -287,6 +285,20 @@ public AuthorizationControls build() { this.spendingLimits); } + /** + * Add an element to `allowedCategories` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardUpdateParams.AuthorizationControls#allowedCategories} for the field + * documentation. + */ + public Builder addAllowedCategory(AllowedCategory element) { + if (this.allowedCategories == null) { + this.allowedCategories = new ArrayList<>(); + } + this.allowedCategories.add(element); + return this; + } + /** * Add all elements to `allowedCategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. See @@ -399,20 +411,6 @@ public Builder addAllSpendingLimit(List elements) { this.spendingLimits.addAll(elements); return this; } - - /** - * Add an element to `allowedCategories` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. See - * {@link CardUpdateParams.AuthorizationControls#allowedCategories} for the field - * documentation. - */ - public Builder addAllowedCategory(AllowedCategory element) { - if (this.allowedCategories == null) { - this.allowedCategories = new ArrayList<>(); - } - this.allowedCategories.add(element); - return this; - } } public static class SpendingLimit { @@ -456,8 +454,7 @@ private SpendingLimit( } public static Builder builder() { - return new com.stripe.param.issuing.CardUpdateParams.AuthorizationControls.SpendingLimit - .Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java b/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java index a172b63f7ad..37def4d9a54 100644 --- a/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -95,7 +93,7 @@ private CardholderCreateParams( } public static Builder builder() { - return new com.stripe.param.issuing.CardholderCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -322,7 +320,7 @@ private AuthorizationControls( } public static Builder builder() { - return new com.stripe.param.issuing.CardholderCreateParams.AuthorizationControls.Builder(); + return new Builder(); } public static class Builder { @@ -346,6 +344,20 @@ public AuthorizationControls build() { this.spendingLimitsCurrency); } + /** + * Add an element to `allowedCategories` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardholderCreateParams.AuthorizationControls#allowedCategories} for the field + * documentation. + */ + public Builder addAllowedCategory(AllowedCategory element) { + if (this.allowedCategories == null) { + this.allowedCategories = new ArrayList<>(); + } + this.allowedCategories.add(element); + return this; + } + /** * Add all elements to `allowedCategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. See @@ -446,20 +458,6 @@ public Builder setSpendingLimitsCurrency(String spendingLimitsCurrency) { this.spendingLimitsCurrency = spendingLimitsCurrency; return this; } - - /** - * Add an element to `allowedCategories` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. See - * {@link CardholderCreateParams.AuthorizationControls#allowedCategories} for the field - * documentation. - */ - public Builder addAllowedCategory(AllowedCategory element) { - if (this.allowedCategories == null) { - this.allowedCategories = new ArrayList<>(); - } - this.allowedCategories.add(element); - return this; - } } public static class SpendingLimit { @@ -503,8 +501,7 @@ private SpendingLimit( } public static Builder builder() { - return new com.stripe.param.issuing.CardholderCreateParams.AuthorizationControls - .SpendingLimit.Builder(); + return new Builder(); } public static class Builder { @@ -3301,7 +3298,7 @@ private Billing(Address address, Map extraParams, String name) { } public static Builder builder() { - return new com.stripe.param.issuing.CardholderCreateParams.Billing.Builder(); + return new Builder(); } public static class Builder { @@ -3403,7 +3400,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.issuing.CardholderCreateParams.Billing.Address.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/CardholderListParams.java b/src/main/java/com/stripe/param/issuing/CardholderListParams.java index a27fed3d6cc..5f7d31b9a19 100644 --- a/src/main/java/com/stripe/param/issuing/CardholderListParams.java +++ b/src/main/java/com/stripe/param/issuing/CardholderListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -101,7 +99,7 @@ private CardholderListParams( } public static Builder builder() { - return new com.stripe.param.issuing.CardholderListParams.Builder(); + return new Builder(); } public static class Builder { @@ -309,7 +307,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.issuing.CardholderListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/CardholderRetrieveParams.java b/src/main/java/com/stripe/param/issuing/CardholderRetrieveParams.java index 3f1221c184e..1c50a18fdd6 100644 --- a/src/main/java/com/stripe/param/issuing/CardholderRetrieveParams.java +++ b/src/main/java/com/stripe/param/issuing/CardholderRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private CardholderRetrieveParams(List expand, Map extraP } public static Builder builder() { - return new com.stripe.param.issuing.CardholderRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java index 74cf9ad50c3..c7e36b6492c 100644 --- a/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -85,7 +83,7 @@ private CardholderUpdateParams( } public static Builder builder() { - return new com.stripe.param.issuing.CardholderUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -291,7 +289,7 @@ private AuthorizationControls( } public static Builder builder() { - return new com.stripe.param.issuing.CardholderUpdateParams.AuthorizationControls.Builder(); + return new Builder(); } public static class Builder { @@ -315,6 +313,20 @@ public AuthorizationControls build() { this.spendingLimitsCurrency); } + /** + * Add an element to `allowedCategories` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link CardholderUpdateParams.AuthorizationControls#allowedCategories} for the field + * documentation. + */ + public Builder addAllowedCategory(AllowedCategory element) { + if (this.allowedCategories == null) { + this.allowedCategories = new ArrayList<>(); + } + this.allowedCategories.add(element); + return this; + } + /** * Add all elements to `allowedCategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. See @@ -415,20 +427,6 @@ public Builder setSpendingLimitsCurrency(String spendingLimitsCurrency) { this.spendingLimitsCurrency = spendingLimitsCurrency; return this; } - - /** - * Add an element to `allowedCategories` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. See - * {@link CardholderUpdateParams.AuthorizationControls#allowedCategories} for the field - * documentation. - */ - public Builder addAllowedCategory(AllowedCategory element) { - if (this.allowedCategories == null) { - this.allowedCategories = new ArrayList<>(); - } - this.allowedCategories.add(element); - return this; - } } public static class SpendingLimit { @@ -472,8 +470,7 @@ private SpendingLimit( } public static Builder builder() { - return new com.stripe.param.issuing.CardholderUpdateParams.AuthorizationControls - .SpendingLimit.Builder(); + return new Builder(); } public static class Builder { @@ -3270,7 +3267,7 @@ private Billing(Address address, Map extraParams, String name) { } public static Builder builder() { - return new com.stripe.param.issuing.CardholderUpdateParams.Billing.Builder(); + return new Builder(); } public static class Builder { @@ -3372,7 +3369,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.issuing.CardholderUpdateParams.Billing.Address.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/DisputeCreateParams.java b/src/main/java/com/stripe/param/issuing/DisputeCreateParams.java index 9bedcc37306..61b3a0e4803 100644 --- a/src/main/java/com/stripe/param/issuing/DisputeCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/DisputeCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -71,7 +69,7 @@ private DisputeCreateParams( } public static Builder builder() { - return new com.stripe.param.issuing.DisputeCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -240,7 +238,7 @@ private Evidence(Map extraParams, Fraudulent fraudulent, Other o } public static Builder builder() { - return new com.stripe.param.issuing.DisputeCreateParams.Evidence.Builder(); + return new Builder(); } public static class Builder { @@ -329,7 +327,7 @@ private Fraudulent( } public static Builder builder() { - return new com.stripe.param.issuing.DisputeCreateParams.Evidence.Fraudulent.Builder(); + return new Builder(); } public static class Builder { @@ -418,7 +416,7 @@ private Other( } public static Builder builder() { - return new com.stripe.param.issuing.DisputeCreateParams.Evidence.Other.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/DisputeListParams.java b/src/main/java/com/stripe/param/issuing/DisputeListParams.java index 46bbc0cad10..561bacb7350 100644 --- a/src/main/java/com/stripe/param/issuing/DisputeListParams.java +++ b/src/main/java/com/stripe/param/issuing/DisputeListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -74,7 +72,7 @@ private DisputeListParams( } public static Builder builder() { - return new com.stripe.param.issuing.DisputeListParams.Builder(); + return new Builder(); } public static class Builder { @@ -241,7 +239,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.issuing.DisputeListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/DisputeRetrieveParams.java b/src/main/java/com/stripe/param/issuing/DisputeRetrieveParams.java index d6fbe78121a..f077fbb7e6a 100644 --- a/src/main/java/com/stripe/param/issuing/DisputeRetrieveParams.java +++ b/src/main/java/com/stripe/param/issuing/DisputeRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private DisputeRetrieveParams(List expand, Map extraPara } public static Builder builder() { - return new com.stripe.param.issuing.DisputeRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/DisputeUpdateParams.java b/src/main/java/com/stripe/param/issuing/DisputeUpdateParams.java index 955833628a8..38924acff96 100644 --- a/src/main/java/com/stripe/param/issuing/DisputeUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/DisputeUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -39,7 +37,7 @@ private DisputeUpdateParams( } public static Builder builder() { - return new com.stripe.param.issuing.DisputeUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/TransactionListParams.java b/src/main/java/com/stripe/param/issuing/TransactionListParams.java index 6a76fe66163..a31f5240e85 100644 --- a/src/main/java/com/stripe/param/issuing/TransactionListParams.java +++ b/src/main/java/com/stripe/param/issuing/TransactionListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -86,7 +84,7 @@ private TransactionListParams( } public static Builder builder() { - return new com.stripe.param.issuing.TransactionListParams.Builder(); + return new Builder(); } public static class Builder { @@ -271,7 +269,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.issuing.TransactionListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/TransactionRetrieveParams.java b/src/main/java/com/stripe/param/issuing/TransactionRetrieveParams.java index 8ac1be58c46..d7d7d87fc32 100644 --- a/src/main/java/com/stripe/param/issuing/TransactionRetrieveParams.java +++ b/src/main/java/com/stripe/param/issuing/TransactionRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private TransactionRetrieveParams(List expand, Map extra } public static Builder builder() { - return new com.stripe.param.issuing.TransactionRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/issuing/TransactionUpdateParams.java b/src/main/java/com/stripe/param/issuing/TransactionUpdateParams.java index 8d86848fd8d..3cfe8f06116 100644 --- a/src/main/java/com/stripe/param/issuing/TransactionUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/TransactionUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.issuing; import com.google.gson.annotations.SerializedName; @@ -34,7 +32,7 @@ private TransactionUpdateParams( } public static Builder builder() { - return new com.stripe.param.issuing.TransactionUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/radar/EarlyFraudWarningListParams.java b/src/main/java/com/stripe/param/radar/EarlyFraudWarningListParams.java index dfc25a1f0e9..f401a7388ec 100644 --- a/src/main/java/com/stripe/param/radar/EarlyFraudWarningListParams.java +++ b/src/main/java/com/stripe/param/radar/EarlyFraudWarningListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.radar; import com.google.gson.annotations.SerializedName; @@ -68,7 +66,7 @@ private EarlyFraudWarningListParams( } public static Builder builder() { - return new com.stripe.param.radar.EarlyFraudWarningListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/radar/EarlyFraudWarningRetrieveParams.java b/src/main/java/com/stripe/param/radar/EarlyFraudWarningRetrieveParams.java index df0824df81c..0a732cace67 100644 --- a/src/main/java/com/stripe/param/radar/EarlyFraudWarningRetrieveParams.java +++ b/src/main/java/com/stripe/param/radar/EarlyFraudWarningRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.radar; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private EarlyFraudWarningRetrieveParams(List expand, Map } public static Builder builder() { - return new com.stripe.param.radar.EarlyFraudWarningRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/radar/ValueListCreateParams.java b/src/main/java/com/stripe/param/radar/ValueListCreateParams.java index 4bdc44d3f92..24c51f1614b 100644 --- a/src/main/java/com/stripe/param/radar/ValueListCreateParams.java +++ b/src/main/java/com/stripe/param/radar/ValueListCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.radar; import com.google.gson.annotations.SerializedName; @@ -64,7 +62,7 @@ private ValueListCreateParams( } public static Builder builder() { - return new com.stripe.param.radar.ValueListCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/radar/ValueListItemCreateParams.java b/src/main/java/com/stripe/param/radar/ValueListItemCreateParams.java index 5a45b039f42..dfe1676bb72 100644 --- a/src/main/java/com/stripe/param/radar/ValueListItemCreateParams.java +++ b/src/main/java/com/stripe/param/radar/ValueListItemCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.radar; import com.google.gson.annotations.SerializedName; @@ -40,7 +38,7 @@ private ValueListItemCreateParams( } public static Builder builder() { - return new com.stripe.param.radar.ValueListItemCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/radar/ValueListItemListParams.java b/src/main/java/com/stripe/param/radar/ValueListItemListParams.java index 26b4e180744..7146ec1960e 100644 --- a/src/main/java/com/stripe/param/radar/ValueListItemListParams.java +++ b/src/main/java/com/stripe/param/radar/ValueListItemListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.radar; import com.google.gson.annotations.SerializedName; @@ -82,7 +80,7 @@ private ValueListItemListParams( } public static Builder builder() { - return new com.stripe.param.radar.ValueListItemListParams.Builder(); + return new Builder(); } public static class Builder { @@ -259,7 +257,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.radar.ValueListItemListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/radar/ValueListItemRetrieveParams.java b/src/main/java/com/stripe/param/radar/ValueListItemRetrieveParams.java index b852a3741e4..bbbc9e67591 100644 --- a/src/main/java/com/stripe/param/radar/ValueListItemRetrieveParams.java +++ b/src/main/java/com/stripe/param/radar/ValueListItemRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.radar; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ValueListItemRetrieveParams(List expand, Map ext } public static Builder builder() { - return new com.stripe.param.radar.ValueListItemRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/radar/ValueListListParams.java b/src/main/java/com/stripe/param/radar/ValueListListParams.java index dae6c307b7f..e8ff335630e 100644 --- a/src/main/java/com/stripe/param/radar/ValueListListParams.java +++ b/src/main/java/com/stripe/param/radar/ValueListListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.radar; import com.google.gson.annotations.SerializedName; @@ -79,7 +77,7 @@ private ValueListListParams( } public static Builder builder() { - return new com.stripe.param.radar.ValueListListParams.Builder(); + return new Builder(); } public static class Builder { @@ -253,7 +251,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.radar.ValueListListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/radar/ValueListRetrieveParams.java b/src/main/java/com/stripe/param/radar/ValueListRetrieveParams.java index 116780f0275..d7f2cfdc580 100644 --- a/src/main/java/com/stripe/param/radar/ValueListRetrieveParams.java +++ b/src/main/java/com/stripe/param/radar/ValueListRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.radar; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ValueListRetrieveParams(List expand, Map extraPa } public static Builder builder() { - return new com.stripe.param.radar.ValueListRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/radar/ValueListUpdateParams.java b/src/main/java/com/stripe/param/radar/ValueListUpdateParams.java index f57b2bcef52..bbe6426806a 100644 --- a/src/main/java/com/stripe/param/radar/ValueListUpdateParams.java +++ b/src/main/java/com/stripe/param/radar/ValueListUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.radar; import com.google.gson.annotations.SerializedName; @@ -53,7 +51,7 @@ private ValueListUpdateParams( } public static Builder builder() { - return new com.stripe.param.radar.ValueListUpdateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/reporting/ReportRunCreateParams.java b/src/main/java/com/stripe/param/reporting/ReportRunCreateParams.java index 407666cada1..ef1cea7963f 100644 --- a/src/main/java/com/stripe/param/reporting/ReportRunCreateParams.java +++ b/src/main/java/com/stripe/param/reporting/ReportRunCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.reporting; import com.google.gson.annotations.SerializedName; @@ -51,7 +49,7 @@ private ReportRunCreateParams( } public static Builder builder() { - return new com.stripe.param.reporting.ReportRunCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -202,7 +200,7 @@ private Parameters( } public static Builder builder() { - return new com.stripe.param.reporting.ReportRunCreateParams.Parameters.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/reporting/ReportRunListParams.java b/src/main/java/com/stripe/param/reporting/ReportRunListParams.java index 37cf8bd3619..e29b509f89a 100644 --- a/src/main/java/com/stripe/param/reporting/ReportRunListParams.java +++ b/src/main/java/com/stripe/param/reporting/ReportRunListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.reporting; import com.google.gson.annotations.SerializedName; @@ -67,7 +65,7 @@ private ReportRunListParams( } public static Builder builder() { - return new com.stripe.param.reporting.ReportRunListParams.Builder(); + return new Builder(); } public static class Builder { @@ -223,7 +221,7 @@ private Created(Map extraParams, Long gt, Long gte, Long lt, Lon } public static Builder builder() { - return new com.stripe.param.reporting.ReportRunListParams.Created.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/reporting/ReportRunRetrieveParams.java b/src/main/java/com/stripe/param/reporting/ReportRunRetrieveParams.java index 9115306c269..d7c0ee29e11 100644 --- a/src/main/java/com/stripe/param/reporting/ReportRunRetrieveParams.java +++ b/src/main/java/com/stripe/param/reporting/ReportRunRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.reporting; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ReportRunRetrieveParams(List expand, Map extraPa } public static Builder builder() { - return new com.stripe.param.reporting.ReportRunRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/reporting/ReportTypeListParams.java b/src/main/java/com/stripe/param/reporting/ReportTypeListParams.java index fcfd7df40ab..476f8f70b65 100644 --- a/src/main/java/com/stripe/param/reporting/ReportTypeListParams.java +++ b/src/main/java/com/stripe/param/reporting/ReportTypeListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.reporting; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ReportTypeListParams(List expand, Map extraParam } public static Builder builder() { - return new com.stripe.param.reporting.ReportTypeListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/reporting/ReportTypeRetrieveParams.java b/src/main/java/com/stripe/param/reporting/ReportTypeRetrieveParams.java index 24e2a734639..04c135c0923 100644 --- a/src/main/java/com/stripe/param/reporting/ReportTypeRetrieveParams.java +++ b/src/main/java/com/stripe/param/reporting/ReportTypeRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.reporting; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ReportTypeRetrieveParams(List expand, Map extraP } public static Builder builder() { - return new com.stripe.param.reporting.ReportTypeRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/sigma/ScheduledQueryRunListParams.java b/src/main/java/com/stripe/param/sigma/ScheduledQueryRunListParams.java index a5fd13fad48..813552d45d6 100644 --- a/src/main/java/com/stripe/param/sigma/ScheduledQueryRunListParams.java +++ b/src/main/java/com/stripe/param/sigma/ScheduledQueryRunListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.sigma; import com.google.gson.annotations.SerializedName; @@ -62,7 +60,7 @@ private ScheduledQueryRunListParams( } public static Builder builder() { - return new com.stripe.param.sigma.ScheduledQueryRunListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/sigma/ScheduledQueryRunRetrieveParams.java b/src/main/java/com/stripe/param/sigma/ScheduledQueryRunRetrieveParams.java index f51f03b3e4a..c8b913db097 100644 --- a/src/main/java/com/stripe/param/sigma/ScheduledQueryRunRetrieveParams.java +++ b/src/main/java/com/stripe/param/sigma/ScheduledQueryRunRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.sigma; import com.google.gson.annotations.SerializedName; @@ -29,7 +27,7 @@ private ScheduledQueryRunRetrieveParams(List expand, Map } public static Builder builder() { - return new com.stripe.param.sigma.ScheduledQueryRunRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/terminal/ConnectionTokenCreateParams.java b/src/main/java/com/stripe/param/terminal/ConnectionTokenCreateParams.java index e2864bd6c2a..64aa1e778c6 100644 --- a/src/main/java/com/stripe/param/terminal/ConnectionTokenCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConnectionTokenCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.terminal; import com.google.gson.annotations.SerializedName; @@ -51,7 +49,7 @@ private ConnectionTokenCreateParams( } public static Builder builder() { - return new com.stripe.param.terminal.ConnectionTokenCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/terminal/LocationCreateParams.java b/src/main/java/com/stripe/param/terminal/LocationCreateParams.java index 0c351999a1b..c99de8c3a87 100644 --- a/src/main/java/com/stripe/param/terminal/LocationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/LocationCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.terminal; import com.google.gson.annotations.SerializedName; @@ -53,7 +51,7 @@ private LocationCreateParams( } public static Builder builder() { - return new com.stripe.param.terminal.LocationCreateParams.Builder(); + return new Builder(); } public static class Builder { @@ -195,7 +193,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.terminal.LocationCreateParams.Address.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/terminal/LocationDeleteParams.java b/src/main/java/com/stripe/param/terminal/LocationDeleteParams.java index dbf6c99e7d7..14105504a14 100644 --- a/src/main/java/com/stripe/param/terminal/LocationDeleteParams.java +++ b/src/main/java/com/stripe/param/terminal/LocationDeleteParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.terminal; import com.google.gson.annotations.SerializedName; @@ -31,7 +29,7 @@ private LocationDeleteParams(Map extraParams, String operatorAcc } public static Builder builder() { - return new com.stripe.param.terminal.LocationDeleteParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/terminal/LocationListParams.java b/src/main/java/com/stripe/param/terminal/LocationListParams.java index 4182f353703..07e425a06cd 100644 --- a/src/main/java/com/stripe/param/terminal/LocationListParams.java +++ b/src/main/java/com/stripe/param/terminal/LocationListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.terminal; import com.google.gson.annotations.SerializedName; @@ -72,7 +70,7 @@ private LocationListParams( } public static Builder builder() { - return new com.stripe.param.terminal.LocationListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/terminal/LocationRetrieveParams.java b/src/main/java/com/stripe/param/terminal/LocationRetrieveParams.java index 93802ff2b38..f70c0e1fdf0 100644 --- a/src/main/java/com/stripe/param/terminal/LocationRetrieveParams.java +++ b/src/main/java/com/stripe/param/terminal/LocationRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.terminal; import com.google.gson.annotations.SerializedName; @@ -39,7 +37,7 @@ private LocationRetrieveParams( } public static Builder builder() { - return new com.stripe.param.terminal.LocationRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java b/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java index b0c8cbd1746..c2ab3ef26f6 100644 --- a/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.terminal; import com.google.gson.annotations.SerializedName; @@ -53,7 +51,7 @@ private LocationUpdateParams( } public static Builder builder() { - return new com.stripe.param.terminal.LocationUpdateParams.Builder(); + return new Builder(); } public static class Builder { @@ -195,7 +193,7 @@ private Address( } public static Builder builder() { - return new com.stripe.param.terminal.LocationUpdateParams.Address.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/terminal/ReaderCreateParams.java b/src/main/java/com/stripe/param/terminal/ReaderCreateParams.java index 2df0948c5c7..c3601e01b55 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderCreateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.terminal; import com.google.gson.annotations.SerializedName; @@ -65,7 +63,7 @@ private ReaderCreateParams( } public static Builder builder() { - return new com.stripe.param.terminal.ReaderCreateParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/terminal/ReaderDeleteParams.java b/src/main/java/com/stripe/param/terminal/ReaderDeleteParams.java index 072d08baca7..39b072531e9 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderDeleteParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderDeleteParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.terminal; import com.google.gson.annotations.SerializedName; @@ -31,7 +29,7 @@ private ReaderDeleteParams(Map extraParams, String operatorAccou } public static Builder builder() { - return new com.stripe.param.terminal.ReaderDeleteParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/terminal/ReaderListParams.java b/src/main/java/com/stripe/param/terminal/ReaderListParams.java index 0cc3b1a46cd..215b944379d 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderListParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderListParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.terminal; import com.google.gson.annotations.SerializedName; @@ -85,7 +83,7 @@ private ReaderListParams( } public static Builder builder() { - return new com.stripe.param.terminal.ReaderListParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/terminal/ReaderRetrieveParams.java b/src/main/java/com/stripe/param/terminal/ReaderRetrieveParams.java index 945964f56ff..7bd5e705542 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderRetrieveParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderRetrieveParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.terminal; import com.google.gson.annotations.SerializedName; @@ -39,7 +37,7 @@ private ReaderRetrieveParams( } public static Builder builder() { - return new com.stripe.param.terminal.ReaderRetrieveParams.Builder(); + return new Builder(); } public static class Builder { diff --git a/src/main/java/com/stripe/param/terminal/ReaderUpdateParams.java b/src/main/java/com/stripe/param/terminal/ReaderUpdateParams.java index 94955aa8d61..c2a59eed4dc 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderUpdateParams.java @@ -1,5 +1,3 @@ -// Generated by com.stripe.generator.entity.SdkBuilder - package com.stripe.param.terminal; import com.google.gson.annotations.SerializedName; @@ -44,7 +42,7 @@ private ReaderUpdateParams( } public static Builder builder() { - return new com.stripe.param.terminal.ReaderUpdateParams.Builder(); + return new Builder(); } public static class Builder {